From 52a788582119e3c73fa38f90ee3573405a424017 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Tue, 24 Sep 2024 15:50:26 +0200 Subject: [PATCH] build: run compilemessages in the Dockerfile (#41) * build: run compilemessages in the Dockerfile * chore(docker-compose): remove compilemessages cmd from migrate container --- Dockerfile | 7 ++++++- docker-compose.yml | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c14f0b5..8ac4e2bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file +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 diff --git a/docker-compose.yml b/docker-compose.yml index 7194af2a..bad0e8b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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"