From 99b54c5f7d282600539b3ff3e0f73f9be120da83 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 1 Jun 2016 13:44:41 +0800 Subject: [PATCH 1/2] remove unnecessary data volume of redis. Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 3 +-- redis/Dockerfile | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dd3ad77d..4cd25e5c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,6 @@ services: - /var/lib/mysql - /var/lib/postgres - /var/lib/mariadb - - /var/lib/redis - /var/lib/memcached - /var/lib/neo4j/data @@ -77,7 +76,7 @@ services: ### MariaDB Container ####################################### - mariadb: + mariadb: build: ./mariadb volumes_from: - data diff --git a/redis/Dockerfile b/redis/Dockerfile index 35e4e97b..d0bbc96f 100644 --- a/redis/Dockerfile +++ b/redis/Dockerfile @@ -2,10 +2,6 @@ FROM redis:latest MAINTAINER Mahmoud Zalt -#COPY redis.conf /usr/local/etc/redis/redis.conf - -VOLUME /var/lib/redis - CMD [ "redis-server" ] EXPOSE 6379 From a8b4b61e284e2c08772aa66c46b7ce497f8a8a3e Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Fri, 3 Jun 2016 01:50:11 +0300 Subject: [PATCH 2/2] update the volumes mounting of the DB containers --- docker-compose.yml | 11 ++++++----- redis/Dockerfile | 6 +++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4cd25e5c..350a8ebe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,11 +27,12 @@ services: data: build: ./data volumes: - - /var/lib/mysql - - /var/lib/postgres - - /var/lib/mariadb - - /var/lib/memcached - - /var/lib/neo4j/data + - /var/lib/mysql:/var/lib/mysql + - /var/lib/postgres:/var/lib/postgres + - /var/lib/mariadb:/var/lib/mariadb + - /var/lib/memcached:/var/lib/memcached + - /var/lib/neo4j:/var/lib/neo4j/data + - /var/lib/redis:/data ### Nginx Server Container ################################## diff --git a/redis/Dockerfile b/redis/Dockerfile index d0bbc96f..e8fedab3 100644 --- a/redis/Dockerfile +++ b/redis/Dockerfile @@ -2,6 +2,10 @@ FROM redis:latest MAINTAINER Mahmoud Zalt -CMD [ "redis-server" ] +#COPY redis.conf /usr/local/etc/redis/redis.conf + +VOLUME /data EXPOSE 6379 + +CMD ["redis-server"]