Make a proper conf mount for Redis

This commit is contained in:
Disassembler 2018-01-27 14:31:11 +01:00
parent e3e4a91dcd
commit 2584e263fc
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 4 additions and 4 deletions

View File

@ -5,9 +5,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/redis
docker build -t redis ${SOURCE_DIR} docker build -t redis ${SOURCE_DIR}
# Configure Redis # Configure Redis
mkdir -p /srv/redis mkdir -p /srv/redis/conf /srv/redis/data
cp ${SOURCE_DIR}/srv/redis/redis.conf /srv/redis/redis.conf cp ${SOURCE_DIR}/srv/redis/conf/redis.conf /srv/redis/conf/redis.conf
chown -R 6379:6379 /srv/redis chown -R 6379:6379 /srv/redis/data
# Configure Redis service # Configure Redis service
cp ${SOURCE_DIR}/etc/init.d/redis /etc/init.d/redis cp ${SOURCE_DIR}/etc/init.d/redis /etc/init.d/redis

View File

@ -11,7 +11,7 @@ start() {
/usr/bin/docker run -d --rm \ /usr/bin/docker run -d --rm \
--name redis \ --name redis \
-h redis \ -h redis \
-v /srv/redis/redis.conf:/etc/redis.conf \ -v /srv/redis/conf/redis.conf:/etc/redis.conf \
-v /srv/redis/data:/var/lib/redis \ -v /srv/redis/data:/var/lib/redis \
redis redis
} }