Created
November 3, 2020 07:21
-
-
Save dipeshhkc/aad23e12223999a8fc9c8d1b7a85aa62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
web: | |
build: | |
context: . | |
dockerfile: ./docker/app.dockerfile | |
ports: | |
- 8080:8080 | |
volumes: | |
- .:/golang-docker | |
depends_on: | |
- database | |
container_name: golang-docker-web | |
environment: | |
- 'DB_PORT=3306' | |
- 'DB_HOST=database' | |
database: | |
image: mysql:5.7.22 | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: root | |
MYSQL_PASSWORD: root | |
MYSQL_DATABASE: golang-docker | |
container_name: golang-docker-db | |
ports: | |
- 33066:3306 | |
volumes: | |
- golang-docker-data:/var/lib/mysql | |
pma: | |
image: phpmyadmin/phpmyadmin | |
depends_on: | |
- database | |
ports: | |
- 5003:80 | |
environment: | |
- 'PMA_HOST=database' | |
- 'PMA_PORT=3306' | |
container_name: golang-docker-pma | |
# persisted storage | |
volumes: | |
golang-docker-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment