forked from erp-dev/erp
giveup3
This commit is contained in:
@@ -13,6 +13,12 @@ services:
|
||||
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
|
||||
pgbouncer:
|
||||
@@ -29,8 +35,15 @@ services:
|
||||
- "${PGBOUNCER_PORT:-6432}:6432"
|
||||
volumes:
|
||||
- ./pgbouncer/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini
|
||||
# 确保 postgres 完全启动后再启动 pgbouncer
|
||||
depends_on:
|
||||
- postgres
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
# DNS 配置:使用 Docker 内置 DNS,并添加 DNS 搜索域
|
||||
dns:
|
||||
- 127.0.0.11 # Docker 内置 DNS
|
||||
dns_search:
|
||||
- . # 当前网络域
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
|
||||
Reference in New Issue
Block a user