chore(service): improve sequin

- make sure Redis is healthy
- formatting
This commit is contained in:
peaklabs-dev
2025-08-04 15:35:27 +02:00
parent f06d80e80e
commit b165d506c9

View File

@@ -9,7 +9,7 @@ services:
image: sequin/sequin:latest
environment:
- SERVICE_FQDN_SEQUIN_7376
- SERVER_HOST=${SERVICE_FQDN_SEQUIN}
- SERVER_HOST=${SERVICE_URL_SEQUIN}
- PG_HOSTNAME=postgres
- PG_DATABASE=${POSTGRES_DB:-sequin-db}
- PG_PORT=5432
@@ -25,44 +25,44 @@ services:
- CRASH_REPORTING_DISABLED=${CRASH_REPORTING_DISABLED:-false}
depends_on:
redis:
condition: service_started
condition: service_healthy
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "http://localhost:7376/health"]
postgres:
image: 'postgres:16'
image: postgres:16
environment:
- POSTGRES_DB=${POSTGRES_DB:-sequin-db}
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
command:
- postgres
- '-c'
- "-c"
- wal_level=logical
healthcheck:
test:
- CMD-SHELL
- 'pg_isready -U ${SERVICE_USER_POSTGRES} -d sequin'
- "pg_isready -U ${SERVICE_USER_POSTGRES} -d sequin"
interval: 10s
timeout: 2s
retries: 5
start_period: 2s
start_interval: 1s
volumes:
- 'postgres_data:/var/lib/postgresql/data'
- postgres_data:/var/lib/postgresql/data
redis:
image: 'redis:7'
image: redis:7
command:
- redis-server
- '--port'
- '6379'
- "--port"
- "6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 20s
retries: 10
volumes:
- 'redis_data:/data'
- redis_data:/data