forked from erp-dev/erp
giveup
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -12,12 +12,6 @@ services:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
|
||||
pgbouncer:
|
||||
@@ -46,15 +40,8 @@ services:
|
||||
PGBOUNCER_LOG_POOLER_ERRORS: "1"
|
||||
ports:
|
||||
- "6432:6432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "timeout 1 bash -c '</dev/tcp/localhost/6432' || exit 1"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
- postgres
|
||||
restart: unless-stopped
|
||||
|
||||
pgadmin:
|
||||
@@ -117,14 +104,10 @@ services:
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: postgres
|
||||
depends_on:
|
||||
pgbouncer:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
rabbitmq:
|
||||
condition: service_started
|
||||
- pgbouncer
|
||||
- postgres
|
||||
- redis
|
||||
- rabbitmq
|
||||
restart: unless-stopped
|
||||
|
||||
celery_worker:
|
||||
@@ -153,14 +136,10 @@ services:
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: postgres
|
||||
depends_on:
|
||||
pgbouncer:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
rabbitmq:
|
||||
condition: service_started
|
||||
- pgbouncer
|
||||
- postgres
|
||||
- redis
|
||||
- rabbitmq
|
||||
restart: unless-stopped
|
||||
|
||||
celery_beat:
|
||||
@@ -188,14 +167,10 @@ services:
|
||||
CELERY_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
|
||||
CELERY_RESULT_BACKEND: redis://redis:6379/0
|
||||
depends_on:
|
||||
pgbouncer:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
rabbitmq:
|
||||
condition: service_started
|
||||
- pgbouncer
|
||||
- postgres
|
||||
- redis
|
||||
- rabbitmq
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
[databases]
|
||||
; 数据库配置将通过环境变量 DATABASES_* 自动生成
|
||||
; 如果环境变量未设置,可以在这里手动配置:
|
||||
; flower = host=postgres port=5432 dbname=flower
|
||||
|
||||
[pgbouncer]
|
||||
; 监听地址和端口
|
||||
listen_addr = 0.0.0.0
|
||||
listen_port = 6432
|
||||
|
||||
; 认证方式:trust 表示信任所有连接(适用于容器内部网络)
|
||||
; 生产环境建议使用 md5 或 scram-sha-256
|
||||
auth_type = trust
|
||||
|
||||
; 连接池配置
|
||||
; pool_mode: session, transaction, statement
|
||||
; transaction 模式最适合 Django,每个事务结束后释放连接
|
||||
pool_mode = transaction
|
||||
max_client_conn = 100
|
||||
default_pool_size = 25
|
||||
min_pool_size = 5
|
||||
reserve_pool_size = 5
|
||||
reserve_pool_timeout = 3
|
||||
|
||||
; 连接超时设置
|
||||
server_connect_timeout = 15
|
||||
server_idle_timeout = 600
|
||||
query_timeout = 0
|
||||
query_wait_timeout = 120
|
||||
|
||||
; 日志配置
|
||||
log_connections = 1
|
||||
log_disconnections = 1
|
||||
log_pooler_errors = 1
|
||||
|
||||
; 其他设置
|
||||
; 忽略 PostgreSQL 16 的额外启动参数
|
||||
ignore_startup_parameters = extra_float_digits
|
||||
application_name_add_host = 1
|
||||
|
||||
Reference in New Issue
Block a user