Make a proper conf mount for Redis
This commit is contained in:
parent
e3e4a91dcd
commit
2584e263fc
6
redis.sh
6
redis.sh
@ -5,9 +5,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/redis
|
||||
docker build -t redis ${SOURCE_DIR}
|
||||
|
||||
# Configure Redis
|
||||
mkdir -p /srv/redis
|
||||
cp ${SOURCE_DIR}/srv/redis/redis.conf /srv/redis/redis.conf
|
||||
chown -R 6379:6379 /srv/redis
|
||||
mkdir -p /srv/redis/conf /srv/redis/data
|
||||
cp ${SOURCE_DIR}/srv/redis/conf/redis.conf /srv/redis/conf/redis.conf
|
||||
chown -R 6379:6379 /srv/redis/data
|
||||
|
||||
# Configure Redis service
|
||||
cp ${SOURCE_DIR}/etc/init.d/redis /etc/init.d/redis
|
||||
|
@ -11,7 +11,7 @@ start() {
|
||||
/usr/bin/docker run -d --rm \
|
||||
--name 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 \
|
||||
redis
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user