Skip to content

Commit 02e2454

Browse files
author
Vincent Chu
committed
add docker-entrypoint-initdb.d variables for MySQL + MariaDB + Percona
1 parent bf60f75 commit 02e2454

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ services:
200200
- TZ=${WORKSPACE_TIMEZONE}
201201
volumes:
202202
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
203-
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
203+
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
204204
ports:
205205
- "${MYSQL_PORT}:3306"
206206
networks:
@@ -218,7 +218,7 @@ services:
218218
- MYSQL_ROOT_PASSWORD=${PERCONA_ROOT_PASSWORD}
219219
volumes:
220220
- ${DATA_SAVE_PATH}/percona:/var/lib/mysql
221-
- ./percona/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
221+
- ${PERCONA_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
222222
ports:
223223
- "${PERCONA_PORT}:3306"
224224
networks:
@@ -246,7 +246,7 @@ services:
246246
build: ./mariadb
247247
volumes:
248248
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
249-
- ./mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
249+
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
250250
ports:
251251
- "${MARIADB_PORT}:3306"
252252
environment:

env-example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ MYSQL_USER=default
9595
MYSQL_PASSWORD=secret
9696
MYSQL_PORT=3306
9797
MYSQL_ROOT_PASSWORD=root
98+
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
9899

99100
### Percona ############################################################################################################
100101

@@ -103,6 +104,7 @@ PERCONA_USER=homestead
103104
PERCONA_PASSWORD=secret
104105
PERCONA_PORT=3306
105106
PERCONA_ROOT_PASSWORD=root
107+
PERCONA_ENTRYPOINT_INITDB=./percona/docker-entrypoint-initdb.d
106108

107109
### MSSQL ##############################################################################################################
108110

@@ -117,6 +119,7 @@ MARIADB_USER=default
117119
MARIADB_PASSWORD=secret
118120
MARIADB_PORT=3306
119121
MARIADB_ROOT_PASSWORD=root
122+
MARIADB_ENTRYPOINT_INITDB=./mariadb/docker-entrypoint-initdb.d
120123

121124
### POSTGRES ###########################################################################################################
122125

0 commit comments

Comments
 (0)