From 398ecc07f63a56d6051ed818d9b771ecdb65c6d9 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Tue, 24 Sep 2024 14:01:53 +0200 Subject: [PATCH 1/2] build: run compilemessages in the Dockerfile --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 From 20afe41b04a6956b0a2a591f1b97e85271f492b3 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Tue, 24 Sep 2024 15:43:27 +0200 Subject: [PATCH 2/2] chore(docker-compose): remove compilemessages cmd from migrate container --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) 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"