Skip to content

Commit

Permalink
build: run compilemessages in the Dockerfile (#41)
Browse files Browse the repository at this point in the history
* build: run compilemessages in the Dockerfile

* chore(docker-compose): remove compilemessages cmd from migrate container
  • Loading branch information
hbollon authored Sep 24, 2024
1 parent 3a96ac6 commit 52a7885
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ RUN apt update && apt install -y libgdal-dev libffi-dev gettext && \
COPY . /app/geoshop_back/

# Copy default settings to settings only if there is no such file
RUN mv -vn /app/geoshop_back/default_settings.py /app/geoshop_back/settings.py
RUN mv -vn /app/geoshop_back/default_settings.py /app/geoshop_back/settings.py

# Compile locales
RUN mv .env.sample .env
RUN python3 manage.py compilemessages --locale=fr
RUN rm -f .env
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ services:
bash -c "
python3 manage.py migrate &&
python3 manage.py collectstatic --noinput &&
python3 manage.py compilemessages --locale=fr &&
python3 manage.py fixturize"
volumes:
- "static-files:/app/geoshop_back/static:rw"
Expand Down

0 comments on commit 52a7885

Please sign in to comment.