build: compilemessages i18n (#2050)

This commit is contained in:
shaohuzhang1 2025-01-21 11:30:10 +08:00 committed by GitHub
parent f3045933df
commit 4bb3a53e9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ class ConfigManager:
def load_from_env(self):
keys = os.environ.keys()
config = {key.replace('MAXKB_', ''): os.environ.get(key) for key in keys if key.startswith('MAXKB_')}
if len(config.keys()) <= 1:
if len(config.keys()) <= 0:
msg = f"""
Error: No config env found.

View File

@ -27,7 +27,7 @@ RUN python3 -m venv /opt/py3 && \
. /opt/py3/bin/activate && \
if [ "$(uname -m)" = "x86_64" ]; then sed -i 's/^torch.*/torch = {version = "^2.2.1+cpu", source = "pytorch"}/g' pyproject.toml; fi && \
poetry install && \
python3 /opt/maxkb/app/apps/manage.py compilemessages
export MAXKB_CONFIG_TYPE=ENV && python3 /opt/maxkb/app/apps/manage.py compilemessages
FROM ghcr.io/1panel-dev/maxkb-python-pg:python3.11-pg15.8
ARG DOCKER_IMAGE_TAG=dev \