feat: backend env config upgrade - multi-env (dev/prod), DB_* support, Docker compatible
Some checks failed
Build and Deploy / test-backend (push) Has been cancelled
Build and Deploy / build-backend (push) Has been cancelled
Build and Deploy / build-admin (push) Has been cancelled
Deploy to Production / build-backend (push) Has been cancelled
Deploy to Production / deploy (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
bujie9527
2026-02-06 12:07:02 +08:00
parent 91c3d75557
commit b715755b76
11 changed files with 141 additions and 35 deletions

View File

@@ -4,8 +4,8 @@
# 镜像标签
TAG=latest
# 数据库配置
DATABASE_URL=postgresql://postgres:CHANGE_ME@db:5432/wecom_ai
# 数据库配置backend 也支持仅设置 DB_HOST/DB_PORT/DB_USER/DB_PASSWORD/DB_NAME自动拼接
DATABASE_URL=postgresql+asyncpg://postgres:CHANGE_ME@db:5432/wecom_ai
DATABASE_URL_SYNC=postgresql://postgres:CHANGE_ME@db:5432/wecom_ai
POSTGRES_USER=postgres
POSTGRES_PASSWORD=CHANGE_ME

View File

@@ -61,8 +61,13 @@ services:
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
# 注意:镜像构建时已经包含了配置,无需挂载
# 如果需要覆盖配置,取消下面的注释并确保 nginx.conf 路径正确
# volumes:
# - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
environment:
- NGINX_HOST=_
- NGINX_PORT=80
depends_on:
- backend
- admin