diff --git a/Dockerfile b/Dockerfile index d5ac341..d505bf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,7 @@ RUN \ zlib-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ + grep \ mariadb-client \ postgresql-client \ python3 \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 234998d..3419dc1 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -26,6 +26,7 @@ RUN \ zlib-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ + grep \ mariadb-client \ postgresql-client \ python3 \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-healthchecks-config/run b/root/etc/s6-overlay/s6-rc.d/init-healthchecks-config/run index 1bc9765..96c18a5 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-healthchecks-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-healthchecks-config/run @@ -81,9 +81,11 @@ function insert_config() { fi } -if [[ -z ${SITE_ROOT} ]]; then +if [[ -z ${SITE_ROOT} ]] && ! grep -q "^SITE_ROOT" /config/local_settings.py; then echo "No SITE_ROOT provided, halting init" sleep infinity +elif [[ -z ${SITE_ROOT} ]] && grep -q "^SITE_ROOT" /config/local_settings.py; then + SITE_ROOT=$(grep -Po "^SITE_ROOT = \K(.*)" /config/local_settings.py | tr -d '"') fi if [[ ! -f "/config/local_settings.py" ]] || [[ "${REGENERATE_SETTINGS,,}" == "true" ]]; then