fix(deploy): wait for state stores on startup

This commit is contained in:
2026-07-14 11:08:13 +03:30
parent 5f88e964f6
commit dd8c21d808
3 changed files with 67 additions and 8 deletions

View File

@@ -35,9 +35,9 @@ services:
start_period: 20s
depends_on:
mongo:
condition: service_started
condition: service_healthy
redis:
condition: service_started
condition: service_healthy
rabbitmq:
condition: service_healthy
@@ -54,6 +54,8 @@ services:
depends_on:
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
demo-app:
build: .
@@ -72,15 +74,26 @@ services:
auth-service:
condition: service_healthy
redis:
condition: service_started
condition: service_healthy
mongo:
image: mongo:7
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 20
rabbitmq:
image: rabbitmq:3.13-management-alpine