Add healthcheck configurations for langfuse-worker and langfuse services in docker-compose.yml

This commit is contained in:
2025-12-21 00:11:00 +00:00
parent 36a6032790
commit 15d2b4ed95

View File

@@ -6,6 +6,12 @@ services:
image: docker.io/langfuse/langfuse-worker:3
depends_on: &langfuse-depends-on
- clickhouse
healthcheck:
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:3030/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)}).on('error', () => process.exit(1))\""]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
environment: &langfuse-worker-env
# NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
# DATABASE_URL: ${DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/postgres} # CHANGEME
@@ -72,6 +78,12 @@ services:
depends_on: *langfuse-depends-on
env_file:
- stack.env
healthcheck:
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:3000/api/public/health?failIfDatabaseUnavailable=true', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)}).on('error', () => process.exit(1))\""]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
environment:
<<: *langfuse-worker-env
# NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-mysecret} # CHANGEME