From 63cc43a6fe937033f4b1f32a13fb45151228d6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Ven=C3=A4l=C3=A4inen?= Date: Fri, 13 Aug 2021 15:35:10 +0300 Subject: [PATCH] Collect static files before running uwsgi --- .gitlab-ci.yml | 2 ++ docker-entrypoint.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 238443b47..ac3a89faa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,6 +19,8 @@ production: variables: K8S_SECRET_STABLE_GCS_BUCKET_NAME: $STABLE_GCS_BUCKET_NAME K8S_SECRET_SMTP_RELAY_HOST: $SMTP_RELAY_HOST + environment: + name: production only: refs: - external_pull_requests diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 943f5c2e6..4555b062d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -38,5 +38,6 @@ elif [[ "$DEV_SERVER" = "1" ]]; then # If no command, and the dev server env var is true, run the dev server exec ./manage.py runserver 0.0.0.0:8000 else + python manage.py collectstatic --noinput exec uwsgi --ini uwsgi.ini fi