From 54102a8b4ce81f53248af9136d04c1989c613639 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 23 Apr 2017 16:11:24 +0200 Subject: [PATCH] DVL-010 Make MySQL|PgSQL data dirs dynamic depending on version (opt container) --- docker-compose.optional.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-compose.optional.yml b/docker-compose.optional.yml index 392ab902..934aef81 100644 --- a/docker-compose.optional.yml +++ b/docker-compose.optional.yml @@ -162,6 +162,11 @@ services: - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + # Server versions + - PHP_SERVER=${PHP_SERVER} + - HTTPD_SERVER=${HTTPD_SERVER} + - POSTGRES_SERVER=${POSTGRES_SERVER} + - MYSQL_SERVER=${MYSQL_SERVER} ## ## Register optional enabled docker containers to PHP @@ -258,7 +263,7 @@ services: - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/conf.d:ro # Mount MySQL Data directory - - ${HOST_PATH_TO_MYSQL_DATADIR}:/var/lib/mysql + - ${HOST_PATH_TO_MYSQL_DATADIR}/${MYSQL_SERVER}:/var/lib/mysql # ---------------------------------------- @@ -297,7 +302,7 @@ services: - pgsql_socket_volume:/var/run/postgresql # Mount PostgreSQL Data directory - - ${HOST_PATH_TO_POSTGRES_DATADIR}:/var/lib/postgresql/data/pgdata + - ${HOST_PATH_TO_POSTGRES_DATADIR}/${POSTGRES_SERVER}:/var/lib/postgresql/data/pgdata # ----------------------------------------