From 3a8bd8a015e1b550e6bf763c4d085f047527cf80 Mon Sep 17 00:00:00 2001 From: wxb Date: Sun, 16 Apr 2017 19:08:03 +0800 Subject: [PATCH] add data save path(mysql/redis/memcached..) --- docker-compose.yml | 26 +++++++++++++------------- env-example | 3 +++ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6e27570..27c65f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -173,7 +173,7 @@ services: - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} volumes: - - mysql:/var/lib/mysql + - ${DATA_SAVE_PATH}/mysql:/var/lib/mysql ports: - "${MYSQL_PORT}:3306" networks: @@ -189,7 +189,7 @@ services: - SA_PASSWORD=${MSSQL_PASSWORD} - ACCEPT_EULA=Y volumes: - - mssql:/var/opt/mssql + - ${DATA_SAVE_PATH}/mssql:/var/opt/mssql ports: - "${MSSQL_PORT}:1433" networks: @@ -200,7 +200,7 @@ services: mariadb: build: ./mariadb volumes: - - mariadb:/var/lib/mysql + - ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql ports: - "${MARIADB_PORT}:3306" environment: @@ -216,7 +216,7 @@ services: postgres: build: ./postgres volumes: - - postgres:/var/lib/postgresql/data + - ${DATA_SAVE_PATH}/postgres:/var/lib/postgresql/data ports: - "${POSTGRES_PORT}:5432" environment: @@ -231,7 +231,7 @@ services: postgres-postgis: build: ./postgres-postgis volumes: - - postgres:/var/lib/postgresql/data + - ${DATA_SAVE_PATH}/postgres:/var/lib/postgresql/data ports: - "${POSTGRES_PORT}:5432" environment: @@ -251,7 +251,7 @@ services: environment: - NEO4J_AUTH=default:secret volumes: - - neo4j:/var/lib/neo4j/data + - ${DATA_SAVE_PATH}/neo4j:/var/lib/neo4j/data networks: - backend @@ -262,7 +262,7 @@ services: ports: - "27017:27017" volumes: - - mongo:/data/db + - ${DATA_SAVE_PATH}/mongo:/data/db networks: - backend @@ -273,7 +273,7 @@ services: ports: - "8090:8080" volumes: - - rethinkdb:/data/rethinkdb_data + - ${DATA_SAVE_PATH}/rethinkdb:/data/rethinkdb_data networks: - backend @@ -282,7 +282,7 @@ services: redis: build: ./redis volumes: - - redis:/data + - ${DATA_SAVE_PATH}/redis:/data ports: - "6379:6379" networks: @@ -295,7 +295,7 @@ services: volumes_from: - workspace volumes: - - aerospike:/opt/aerospike/data + - ${DATA_SAVE_PATH}/aerospike:/opt/aerospike/data ports: - "3000:3000" - "3001:3001" @@ -309,7 +309,7 @@ services: memcached: build: ./memcached volumes: - - memcached:/var/lib/memcached + - ${DATA_SAVE_PATH}/memcached:/var/lib/memcached ports: - "${MEMCACHED_HOST_PORT}:11211" depends_on: @@ -523,10 +523,10 @@ services: JAVA_OPTS: "-Djava.awt.headless=true" ports: - "${JENKINS_HOST_SLAVE_AGENT_PORT}:50000" - - "${JENKINS_HOST_HTTP_PORT}:8080" + - "${JENKINS_HOST_HTTP_PORT}:8080" privileged: true volumes: - - ${JENKINS_HOME}:/var/jenkins_home + - ${JENKINS_HOME}:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock ### Networks Setup ############################################ diff --git a/env-example b/env-example index b6c2ff1..3cf515d 100644 --- a/env-example +++ b/env-example @@ -2,6 +2,9 @@ # Point to your application code, wish should be available at `/var/www` APPLICATION=../ +### Save Data Path (mysql redis mongo...) +DATA_SAVE_PATH=../data + ### PHP version (Does not apply for HHVM) # PHP_VERSION=56 PHP_VERSION=70