diff --git a/{{cookiecutter.project_name}}/.gitignore b/{{cookiecutter.project_name}}/.gitignore index 2c3b11b..ea7f94e 100644 --- a/{{cookiecutter.project_name}}/.gitignore +++ b/{{cookiecutter.project_name}}/.gitignore @@ -16,3 +16,6 @@ env # Static static + +# Trasnlation +*.mo diff --git a/{{cookiecutter.project_name}}/Dockerfile b/{{cookiecutter.project_name}}/Dockerfile index 5e3ffee..e9b7f3a 100644 --- a/{{cookiecutter.project_name}}/Dockerfile +++ b/{{cookiecutter.project_name}}/Dockerfile @@ -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 diff --git a/{{cookiecutter.project_name}}/env.example b/{{cookiecutter.project_name}}/env.example new file mode 100644 index 0000000..9faba6d --- /dev/null +++ b/{{cookiecutter.project_name}}/env.example @@ -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 diff --git a/{{cookiecutter.project_name}}/locale/zh_Hans/LC_MESSAGES/django.mo b/{{cookiecutter.project_name}}/locale/zh_Hans/LC_MESSAGES/django.mo deleted file mode 100644 index 6c18eb0..0000000 Binary files a/{{cookiecutter.project_name}}/locale/zh_Hans/LC_MESSAGES/django.mo and /dev/null differ