Support a separate data root for Docker binds
We run Dokku, and therefore dokku redis, in its own Docker container. In order to make this work we map a path from the host into the container as `/var/lib/dokku/services/redis`. Unfortunately the path on the host is user-configurable, and generally _won't_ be the same as the path in the container. This means that when we run `docker` commands (e.g. to spin up Redis containers), the directory used for bind mounts (the `-v` option) needs to be different. This commit allows us to do this, but keeps the existing behaviour (the redis root for Docker binds is the same as the redis root for other uses) by default.
This commit is contained in:
committed by
Jose Diaz-Gonzalez
parent
6c3a0475d6
commit
deb9317edf
2
config
2
config
@@ -2,10 +2,12 @@
|
||||
export REDIS_IMAGE=${REDIS_IMAGE:="redis"}
|
||||
export REDIS_IMAGE_VERSION=${REDIS_IMAGE_VERSION:="4.0.8"}
|
||||
export REDIS_ROOT=${REDIS_ROOT:="/var/lib/dokku/services/redis"}
|
||||
export REDIS_HOST_ROOT=${REDIS_HOST_ROOT:=$REDIS_ROOT}
|
||||
|
||||
export PLUGIN_COMMAND_PREFIX="redis"
|
||||
export PLUGIN_CONFIG_ROOT=${PLUGIN_CONFIG_ROOT:="$DOKKU_LIB_ROOT/config/$PLUGIN_COMMAND_PREFIX"}
|
||||
export PLUGIN_DATA_ROOT=$REDIS_ROOT
|
||||
export PLUGIN_DATA_HOST_ROOT=$REDIS_HOST_ROOT
|
||||
export PLUGIN_DATASTORE_PORTS=(6379)
|
||||
export PLUGIN_DATASTORE_WAIT_PORT=6379
|
||||
export PLUGIN_DEFAULT_ALIAS="REDIS"
|
||||
|
||||
Reference in New Issue
Block a user