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