Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check config file for site_root as well as env #116

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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