1
0
forked from erp-dev/erp
This commit is contained in:
2025-12-24 23:37:23 +08:00
parent 35bc121a86
commit c331cfa880
4 changed files with 12 additions and 4 deletions

View File

@@ -28,8 +28,12 @@ services:
container_name: pgbouncer
# 使用环境变量配置,让镜像自动生成配置文件
environment:
# 数据库连接配置(格式:数据库名=host=主机 port=端口 dbname=数据库名 user=用户 password=密码)
DATABASES: flower=host=postgres port=${POSTGRES_PORT:-5432} dbname=${POSTGRES_DB:-flower} user=${POSTGRES_USER:-postgres} password=${POSTGRES_PASSWORD:-postgres}
# 数据库连接配置 - 使用单独的环境变量
DATABASES_HOST: postgres
DATABASES_PORT: "${POSTGRES_PORT:-5432}"
DATABASES_USER: ${POSTGRES_USER:-postgres}
DATABASES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
DATABASES_DBNAME: ${POSTGRES_DB:-flower}
# PgBouncer 基本配置
PGBOUNCER_LISTEN_ADDR: 0.0.0.0
PGBOUNCER_LISTEN_PORT: 6432