1
0
forked from erp-dev/erp
This commit is contained in:
2025-12-24 22:55:25 +08:00
parent 9e05617121
commit 9e782f0585
3 changed files with 38 additions and 13 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -12,6 +12,12 @@ services:
- "5432:5432" - "5432:5432"
volumes: volumes:
- db_data:/var/lib/postgresql/data - 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 restart: unless-stopped
pgbouncer: pgbouncer:
@@ -40,8 +46,15 @@ services:
PGBOUNCER_LOG_POOLER_ERRORS: "1" PGBOUNCER_LOG_POOLER_ERRORS: "1"
ports: ports:
- "6432:6432" - "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: depends_on:
- postgres postgres:
condition: service_healthy
restart: unless-stopped restart: unless-stopped
pgadmin: pgadmin:
@@ -104,10 +117,14 @@ services:
DB_USER: postgres DB_USER: postgres
DB_PASSWORD: postgres DB_PASSWORD: postgres
depends_on: depends_on:
- pgbouncer pgbouncer:
- postgres condition: service_healthy
- redis postgres:
- rabbitmq condition: service_healthy
redis:
condition: service_started
rabbitmq:
condition: service_started
restart: unless-stopped restart: unless-stopped
celery_worker: celery_worker:
@@ -136,10 +153,14 @@ services:
DB_USER: postgres DB_USER: postgres
DB_PASSWORD: postgres DB_PASSWORD: postgres
depends_on: depends_on:
- pgbouncer pgbouncer:
- postgres condition: service_healthy
- redis postgres:
- rabbitmq condition: service_healthy
redis:
condition: service_started
rabbitmq:
condition: service_started
restart: unless-stopped restart: unless-stopped
celery_beat: celery_beat:
@@ -167,10 +188,14 @@ services:
CELERY_BROKER_URL: amqp://guest:guest@rabbitmq:5672// CELERY_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
CELERY_RESULT_BACKEND: redis://redis:6379/0 CELERY_RESULT_BACKEND: redis://redis:6379/0
depends_on: depends_on:
- pgbouncer pgbouncer:
- postgres condition: service_healthy
- redis postgres:
- rabbitmq condition: service_healthy
redis:
condition: service_started
rabbitmq:
condition: service_started
restart: unless-stopped restart: unless-stopped
volumes: volumes: