Skip to content

Commit aec7661

Browse files
authored
Merge pull request pycontw#734 from tai271828/mr-automate-mo-generation
Generate .mo files automatically per deployment
2 parents 0aa765b + 6ba175c commit aec7661

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ local.env
3232
venv/
3333
/src/assets/
3434
local.db
35+
*.mo
3536

3637
# NPM
3738
node_modules/

Dockerfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.6
1+
FROM python:3.6-buster
22

33
ENV PYTHONUNBUFFERED 1
44
ENV BASE_DIR /usr/local
@@ -15,6 +15,13 @@ ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
1515
# Add bin directory used by `pip install --user`
1616
ENV PATH "/home/docker/.local/bin:${PATH}"
1717

18+
# Infrastructure tools
19+
# gettext is used for django to compile .po to .mo files.
20+
RUN apt-get update
21+
RUN apt-get install apt-utils -y
22+
RUN apt-get update
23+
RUN apt-get install gettext python3-pip -y
24+
1825
# Install Node and Yarn from upstream
1926
RUN curl -o- $NVM_INSTALLER_URL | bash \
2027
&& . $NVM_DIR/nvm.sh \

docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ services:
1111
- -c
1212
- |
1313
set -o errexit -o nounset -o pipefail
14+
python3 manage.py compilemessages
1415
python3 manage.py migrate
1516
python3 manage.py collectstatic --no-input
1617

0 commit comments

Comments
 (0)