Feat(docker-compose): Proper health check
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good
This commit is contained in:
@@ -13,6 +13,9 @@ services:
|
||||
- "LOGGER_WEBHOOK_URL=${LOGGER_WEBHOOK_URL}"
|
||||
ports:
|
||||
- "127.0.0.1:8009:8000"
|
||||
depends_on:
|
||||
postgres-ktm-train-bot: # Remember to update this
|
||||
condition: service_healthy
|
||||
entrypoint: ["/bin/bash", "-c", "/app/server 2>&1 | /app/messenger --webhook --url $LOGGER_WEBHOOK_URL"]
|
||||
|
||||
#######################################
|
||||
@@ -27,3 +30,8 @@ services:
|
||||
- "POSTGRES_USER=${DB_USER}"
|
||||
- "POSTGRES_PASSWORD=${DB_PASS}"
|
||||
- "POSTGRES_DB=${DB_NAME}"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
|
||||
interval: 5s
|
||||
timeout: 60s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user