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}
|
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
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user