Created
January 6, 2018 23:42
-
-
Save slgithub/259793e4d39408ee1fb7500e383c4a1a to your computer and use it in GitHub Desktop.
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' | |
services: | |
mysqldb: | |
image: mysql | |
container_name: ${MYSQL_HOST} | |
restart: always | |
env_file: | |
- ".env" | |
#.env is the file for configuration which include | |
#MYSQL_HOST=mysql | |
#MYSQL_DATABASE=test | |
#MYSQL_ROOT_USER=root | |
#MYSQL_ROOT_PASSWORD=root | |
#MYSQL_USER=dev | |
#MYSQL_PASSWORD=dev | |
environment: | |
- MYSQL_DATABASE=${MYSQL_DATABASE} | |
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} | |
- MYSQL_USER=${MYSQL_USER} | |
- MYSQL_PASSWORD=${MYSQL_PASSWORD} | |
ports: | |
- "8989:3306" | |
volumes: | |
- "./data/db/mysql:/var/lib/mysql" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment