From edf788f6dd1f3d9a7e8356b0fb47a751460c36f6 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 20 Apr 2017 17:31:52 +0200 Subject: [PATCH 1/3] DVL-004 use docker-compose version 2.1 --- docker-compose.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c595d5c5..877692bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ ## -version: '2' +version: '2.1' ################################################################################ @@ -95,11 +95,6 @@ services: depends_on: - php - links: - # ---- Format: ---- - # SERVICE [ : ALIAS] - - "php:php-fpm" - # ---------------------------------------- # PHP-FPM @@ -203,13 +198,6 @@ services: - postgres - links: - # ---- Format: ---- - # SERVICE [ : ALIAS] - - "mysql:mariadb" - - "postgres:postgresql" - - # ---------------------------------------- # DATABASE # ---------------------------------------- From f400c5b280988bfda743964b61aa4c9606971156 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 20 Apr 2017 17:47:27 +0200 Subject: [PATCH 2/3] DVL-004 Use named volumes for container-only shared data (like sockets) --- .devilbox/www/htdocs/index.php | 7 ------- docker-compose.yml | 23 +++++++++++++++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.devilbox/www/htdocs/index.php b/.devilbox/www/htdocs/index.php index 7b3c5c5c..6d12d0c7 100644 --- a/.devilbox/www/htdocs/index.php +++ b/.devilbox/www/htdocs/index.php @@ -376,9 +376,6 @@ ./etc - MySQL socket - ./run/mysql/mysqld.sock - Log directory ./log @@ -403,10 +400,6 @@ MySQL datadir getEnv('HOST_PATH_TO_MYSQL_DATADIR');?> - - MySQL socket - ./run/mysql/mysqld.sock - Log directory ./log diff --git a/docker-compose.yml b/docker-compose.yml index 877692bb..eda61a19 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -179,10 +179,10 @@ services: - ${DEVILBOX_PATH}/log/${PHP_SERVER}:/var/log/php-fpm # Mount MySQL Socket directory - - ${DEVILBOX_PATH}/run/mysql:/tmp/mysql + - mysql_socket_volume:/tmp/mysql # Mount Mail directory - - ${DEVILBOX_PATH}/run/mail:/var/mail + #- ${DEVILBOX_PATH}/run/mail:/var/mail # Mount devilbox user-defined *.ini files in order # to overwrite the default PHP configuration @@ -241,7 +241,7 @@ services: - ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql # Mount MySQL Socket directory - - ${DEVILBOX_PATH}/run/mysql:/tmp/mysql + - mysql_socket_volume:/tmp/mysql # Mount devilbox user-defined cnf files in order # to overwrite the MySQL server configuration @@ -284,12 +284,27 @@ services: - ${DEVILBOX_PATH}/log/postgres-${POSTGRES_SERVER}:/var/log/postgresql # Mount PostgreSQL Socket directory - - ${DEVILBOX_PATH}/run/postgres:/var/run/postgresql + - pgsql_socket_volume:/var/run/postgresql # Mount PostgreSQL Data directory - ${HOST_PATH_TO_POSTGRES_DATADIR}:/var/lib/postgresql/data/pgdata +################################################################################ +# VOLUMES +################################################################################ +volumes: + # Create volume for mysql socket. + # This removes the need to mount the socket to the host + # but be able to mount it to different containers (from another container) + mysql_socket_volume: + + # Create volume for postgresql socket. + # This removes the need to mount the socket to the host + # but be able to mount it to different containers (from another container) + pgsql_socket_volume: + + ################################################################################ # NETWORK ################################################################################ From 60b622c9f0f997c09b2d2ab49eb69fadc8c9b838 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 20 Apr 2017 18:07:04 +0200 Subject: [PATCH 3/3] DVL-004 Revert to docker-compose version 2 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index eda61a19..ca81a6ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ ## -version: '2.1' +version: '2' ################################################################################