From 91c0aeb7a427e7af3a166692e7b53858812a6185 Mon Sep 17 00:00:00 2001 From: Sam Wilson <91766917+swils23@users.noreply.github.com> Date: Wed, 25 Sep 2024 23:59:27 +0000 Subject: [PATCH] Improve prod dockerfile compatibility --- config/docker/Dockerfile.web | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/docker/Dockerfile.web b/config/docker/Dockerfile.web index 56b98402..712f4350 100644 --- a/config/docker/Dockerfile.web +++ b/config/docker/Dockerfile.web @@ -91,7 +91,8 @@ COPY --chown=app:app . . USER app -RUN SECRET_KEY=e python manage.py collectstatic --no-input +# The app user doesn't have permissions to create collected_static on some systems, so we create it here +RUN mkdir -p /srv/app/collected_static && chown -R app:app /srv/app/collected_static COPY --from=js_assets --chown=app:app /srv/app/public/static/ ./collected_static