@@ -12,6 +12,11 @@ services:
1212 - ../../services/backend/db/init:/docker-entrypoint-initdb.d
1313 ports :
1414 - " 5432:5432"
15+ healthcheck :
16+ test : ["CMD-SHELL", "pg_isready -U test_user -d test_db"]
17+ interval : 5s
18+ timeout : 5s
19+ retries : 5
1520
1621 elasticsearch :
1722 image : docker.elastic.co/elasticsearch/elasticsearch:8.13.4
@@ -51,33 +56,50 @@ services:
5156
5257 rabbitmq :
5358 image : rabbitmq:3.13-management
54- restart : unless-stopped
59+ ports : [ "5672:5672", "15672:15672" ]
60+ healthcheck :
61+ test : [ "CMD-SHELL", "rabbitmq-diagnostics -q ping" ]
62+ interval : 10s
63+ timeout : 5s
64+ retries : 5
65+
66+ redis :
67+ image : redis:7-alpine
68+ healthcheck :
69+ test : [ "CMD-SHELL", "redis-cli ping || exit 1" ]
70+ interval : 5s
71+ timeout : 3s
72+ retries : 10
5573 ports :
56- - " 5672:5672"
57- - " 15672:15672"
74+ - " 6379:6379"
5875
5976 patronx-worker :
60- image : xdanielsb/patronx:2.0 .0
61- entrypoint : ["remoulade "]
62- command : ["patronx.tasks "]
77+ image : xdanielsb/patronx:2.1 .0
78+ entrypoint : ["patronx "]
79+ command : ["start "]
6380 restart : unless-stopped
6481 environment :
6582 AMQP_URL : amqp://guest:guest@rabbitmq:5672/
83+ REDIS_URL : redis://redis:6379/0
6684 PGHOST : db
6785 PGPORT : 5432
6886 PGDATABASE : ${POSTGRES_DB}
6987 PGUSER : ${POSTGRES_USER}
7088 PGPASSWORD : ${POSTGRES_PASSWORD}
71- BACKUP_DIR : . /backups
89+ BACKUP_DIR : /app /backups
7290 S3_BUCKET : ${S3_BUCKET}
7391 AWS_ACCESS_KEY_ID : ${AWS_ACCESS_KEY_ID}
7492 AWS_SECRET_ACCESS_KEY : ${AWS_SECRET_ACCESS_KEY}
7593 AWS_DEFAULT_REGION : ${AWS_REGION}
7694 volumes :
77- - ../../backups:. /backups
95+ - ../../backups:/app /backups
7896 depends_on :
79- - db
80- - rabbitmq
97+ db :
98+ condition : service_healthy
99+ redis :
100+ condition : service_healthy
101+ rabbitmq :
102+ condition : service_healthy
81103
82104 analytics :
83105 build :
0 commit comments