Merge pull request #917 from bestlong/mysql-create-multiple-database

MySQL container create multiple databases.
This commit is contained in:
Mike Erickson 2017-05-08 08:31:32 -07:00 committed by GitHub
commit 0e0dc44a49
3 changed files with 10 additions and 0 deletions

View File

@ -194,6 +194,7 @@ services:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports:
- "${MYSQL_PORT}:3306"
networks:

View File

@ -0,0 +1 @@
*.sql

View File

@ -0,0 +1,8 @@
###
### Copy createdb.sql.example to createdb.sql
### then uncomment and set database name to create you need databases
###
#CREATE DATABASE IF NOT EXISTS `dev_db_1` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` ;