feat(docker-compose): Add Docker Compose healthcheck configuration to api and api-worker (#289)

Add functionality mentioned in #853
This commit is contained in:
Jorge Tomas 2023-10-15 14:53:59 +02:00 committed by GitHub
parent 7aa18c9ead
commit b83d29ac02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,8 @@ services:
- db
- redis
command: ["./scripts/start.sh"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
environment:
- LAGO_API_URL=${LAGO_API_URL:-http://localhost:3000}
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}
@ -123,6 +125,8 @@ services:
depends_on:
- api
command: ["./scripts/start.worker.sh"]
healthcheck:
test: ["CMD-SHELL", "bundle exec sidekiqmon | grep $(hostname) || exit 1"]
environment:
- LAGO_API_URL=${LAGO_API_URL:-http://localhost:3000}
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}