Skip to content

Commit

Permalink
chore(translation): compile message while build image
Browse files Browse the repository at this point in the history
  • Loading branch information
OrenZhang committed Oct 16, 2024
1 parent ef125c5 commit 08598db
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
3 changes: 3 additions & 0 deletions {{cookiecutter.project_name}}/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ env

# Static
static

# Trasnlation
*.mo
8 changes: 6 additions & 2 deletions {{cookiecutter.project_name}}/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ FROM python:3.10
RUN mkdir -p /usr/src/app/logs
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN pip3 install -U pip -i https://mirrors.cloud.tencent.com/pypi/simple \
&& pip3 install -r requirements.txt -i https://mirrors.cloud.tencent.com/pypi/simple
RUN pip3 install -U pip && pip3 install -r requirements.txt
RUN apt-get update \
&& apt-get install -y gettext \
&& cp env.example .env \
&& python3 manage.py compilemessages -l zh_Hans \
&& rm -rf .env || echo
16 changes: 16 additions & 0 deletions {{cookiecutter.project_name}}/env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
APP_CODE={{cookiecutter.project_name}}
APP_SECRET={{cookiecutter.project_name}}
BACKEND_URL=https://dev-api.example.com
BACKEND_HOST=dev-api.example.com
FRONTEND_URL=https://dev.example.com
DB_NAME={{cookiecutter.project_name}}
DB_USER={{cookiecutter.project_name}}
DB_PASSWORD=
DB_HOST=127.0.0.1
DB_PORT=3306
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
OVINC_API_DOMAIN=https://api.example.com
OVINC_WEB_URL=https://www.example.com
Binary file not shown.

0 comments on commit 08598db

Please sign in to comment.