1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/tools/docker/entrypoint.sh
Roman Gershman d2b6907f2d Improve docker entry point script.
Change default port to 6379.
Log data directory path.
2022-04-08 08:54:53 +03:00

16 lines
383 B
Bash
Executable file

#!/bin/sh
set -e
# first arg is `-some-option`
if [ "${1#-}" != "$1" ]; then
# override arguments by prepending "dragonfly --logtostderr" to them.
set -- dragonfly --logtostderr "$@"
fi
# allow the docker container to be started with `--user`
if [ "$1" = 'dragonfly' -a "$(id -u)" = '0' ]; then
exec su-exec dfly "$0" "$@" # runs this script under user dfly
fi
exec "$@"