Skip to content

Commit

Permalink
chg: explicit env declaration to migrate and collectstatic
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Nov 17, 2023
1 parent 2c42a84 commit e03f39a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ services:
<<: *django-prod
environment:
<<: *django-prod-env
DJANGO_COLLECTSTATIC: 1
ports:
- "8000:8000"

Expand All @@ -72,6 +73,9 @@ services:
tty: true
stdin_open: true
hostname: django
env:
<<: *django-dev-env
DJANGO_MIGRATE: 1
ports:
- "8000:8000"

Expand Down

0 comments on commit e03f39a

Please sign in to comment.