Skip to content

Commit 91a3c86

Browse files
committed
PPHA-369: Collect static assets into STATIC_ROOT in prod
1 parent e784e31 commit 91a3c86

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ COPY --chown=${USER}:${USER} ./lung_cancer_screening /app/lung_cancer_screening
9999
COPY --from=asset_builder --chown=${USER}:${USER} /app/lung_cancer_screening/assets/compiled /app/lung_cancer_screening/assets/compiled
100100
COPY --chown=${USER}:${USER} manage.py ./
101101

102+
RUN python ./manage.py collectstatic --noinput
103+
102104
EXPOSE 8000
103105

104106
CMD ["/app/.venv/bin/gunicorn", "--bind", "0.0.0.0:8000", "lung_cancer_screening.wsgi"]

lung_cancer_screening/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def boolean_env(key, default=None):
144144
STATIC_ROOT = BASE_DIR / "staticfiles"
145145

146146
STATICFILES_DIRS = [
147+
BASE_DIR / "static",
147148
BASE_DIR / "lung_cancer_screening" / "assets" / "compiled"
148149
]
149150

0 commit comments

Comments
 (0)