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"