From 65e22d90236f6f1a2771a750fa4685218941c7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20L?= Date: Thu, 16 Feb 2023 17:30:35 +0100 Subject: [PATCH] Add gettext alpine package for compiling translations + force compiling when starting the dev server --- docker-compose.yml | 7 ++++++- docker/Dockerfile.dev | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 60c9a211a..695b86a7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,12 @@ services: PYTHONPATH: ".." DB: "SQLITE" DEBUG: "True" - command: sh -c "cd test_project && python3 manage.py migrate && python3 manage.py load_initial_data && python3 manage.py runserver 0:8000" + command: > + sh -c "cd test_project + python3 manage.py migrate + python3 manage.py load_initial_data + django-admin compilemessages + python3 manage.py runserver 0:8000" volumes: - .:/code diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index edbb1d704..618c4b87e 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -7,7 +7,7 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH" FROM base as build RUN apk add --update openssl librrd python3-dev libffi-dev gcc g++ musl-dev libxml2-dev libxslt-dev \ - libressl-dev jpeg-dev rrdtool-dev file make \ + libressl-dev jpeg-dev rrdtool-dev file make gettext \ && rm -rf /var/cache/apk/* RUN python3 -m venv $VIRTUAL_ENV WORKDIR /tmp