Skip to content

Commit

Permalink
Merge pull request #116 from linuxserver/site-root
Browse files Browse the repository at this point in the history
Check config file for site_root as well as env
  • Loading branch information
thespad authored Jan 24, 2024
2 parents c9928ed + d6c2fc0 commit ac68a89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN \
zlib-dev && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
grep \
mariadb-client \
postgresql-client \
python3 \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN \
zlib-dev && \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
grep \
mariadb-client \
postgresql-client \
python3 \
Expand Down
4 changes: 3 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/init-healthchecks-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac68a89

Please sign in to comment.