fix: 支持生产环境外部数据库 6.6.6.66,移除本地 PostgreSQL 容器
All checks were successful
Deploy to Server / deploy (push) Successful in 1m7s

This commit is contained in:
爽哒哒
2026-03-19 00:51:05 +08:00
parent ba48894378
commit 8ca161f8b0
2 changed files with 7 additions and 34 deletions

View File

@@ -108,7 +108,7 @@ DATABASES = {
#从环境变量获取数据库配置 (Docker 环境会自动注入这些变量。
# 只有当 DB_HOST 被明确设置且不为空时才使用 PostgreSQL
DB_HOST = os.environ.get('DB_HOST', '')
if DB_HOST and DB_HOST != '6.6.6.66':
if DB_HOST:
DATABASES['default'] = {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ.get('DB_NAME', 'market'),