Browse Source

Feat(docker-compose): Proper health check

master
Samuel Pua 3 years ago
parent
commit
773e0b7b81
  1. 8
      docker-compose.yml

8
docker-compose.yml

@ -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

Loading…
Cancel
Save