Add redis entrypoint and conf files

This commit is contained in:
2017-06-30 15:21:40 +08:00
parent b39ddd8b94
commit 35dfb06b67
2 changed files with 21 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
# or first arg is `something.conf`
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
set -- redis-server "$@"
fi
# allow the container to be started with `--user`
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then
chown -R redis .
exec gosu redis "$0" "$@"
fi
exec "$@"
+5
View File
@@ -0,0 +1,5 @@
port 6379
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes