From a0e5aada8009b81a5971e2cec578455608fb0998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Cant=C3=B9?= Date: Fri, 17 Nov 2023 14:57:47 +0100 Subject: [PATCH] chg: explicit env declaration to migrate and collectstatic --- Dockerfile | 2 -- docker-compose.yml | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c27c6ea..cd9ce0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,6 @@ COPY --from=production /app . COPY --from=translation /app/locale locale COPY --from=source /app . COPY entrypoint.sh . -ENV DJANGO_COLLECTSTATIC=1 ENTRYPOINT ["./entrypoint.sh"] FROM pdm as dev @@ -58,5 +57,4 @@ RUN --mount=type=cache,target=/root/.cache/pdm \ COPY --from=django /app/locale locale COPY --from=django /app/manage.py . COPY --from=django /app/entrypoint.sh . -ENV DJANGO_MIGRATE=1 ENTRYPOINT ["./entrypoint.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index 27b1557..922e4f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,7 @@ services: <<: *django-prod environment: <<: *django-prod-env + DJANGO_COLLECTSTATIC: 1 ports: - "8000:8000" @@ -72,6 +73,9 @@ services: tty: true stdin_open: true hostname: django + environment: + <<: *django-dev-env + DJANGO_MIGRATE: 1 ports: - "8000:8000"