From 2e2119420b0102539272a7a20511493eb1b97ab1 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 19 Feb 2024 10:03:47 +0100 Subject: [PATCH] fix: run collectstatic first in Docker entrypoint Otherwise when calling any other django command, when loading umap.urls, it will try to read the static manifest, which is not existing or not up to date yet. --- docker/entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d2d2e8de..8ed7fdfb 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -3,11 +3,11 @@ set -eo pipefail source /venv/bin/activate -# first wait for the database +# collect static files +umap collectstatic --noinput +# now wait for the database umap wait_for_database # then migrate the database umap migrate -# then collect static files -umap collectstatic --noinput # run uWSGI exec uwsgi --ini docker/uwsgi.ini