feat: source /etc/defaults/dokku if available

This allows users to override - at a top-level - the DOKKU_ROOT, DOKKU_LIB_ROOT, and other
configuration variables. If specified, this should begin to enable users to move their
Dokku installations to mounted drives.

Note that items installed from packages may not respect these paths, so further work may be in order.

Closes #2958
This commit is contained in:
Jose Diaz-Gonzalez
2018-02-24 16:43:32 -05:00
parent d80a280fc2
commit 5242eeeb86
4 changed files with 38 additions and 2 deletions

5
debian/postinst vendored
View File

@@ -6,6 +6,11 @@ if [[ -e /usr/share/debconf/confmodule ]]; then
. /usr/share/debconf/confmodule
fi
if [[ -r /etc/defaults/dokku ]]; then
# shellcheck disable=SC1091
source /etc/defaults/dokku
fi
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"