Created
May 28, 2020 02:17
-
-
Save 6ewis/0371b50bae74b3d32edde5b4b991bcaf to your computer and use it in GitHub Desktop.
docker compose sample
This file contains 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.7' | |
services: | |
main: | |
container_name: main | |
build: | |
context: . | |
target: development | |
volumes: | |
- .:/usr/src/app | |
- /usr/src/app/node_modules | |
ports: | |
- 9229:9229 | |
command: npm run start:dev | |
env_file: | |
- .env | |
networks: | |
- webnet | |
depends_on: | |
- mysql | |
mysql: | |
networks: | |
- webnet | |
container_name: mysql | |
image: mysql:latest | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
MYSQL_ROOT_PASSWORD: rootpassword | |
ports: | |
- 3306:3306 | |
volumes: | |
- mysql_db_data_container:/var/lib/mysql | |
adminer_container: | |
image: adminer:latest | |
environment: | |
ADMINER_DEFAULT_SERVER: mysql_db_container | |
ports: | |
- 8080:8080 | |
networks: | |
webnet: | |
volumes: | |
mysql_db_data_container: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment