diff --git a/docker-compose.yml b/docker-compose.yml index d9a8e3054..9f18e9f57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,16 @@ --- -version: '3.2' +version: '3.4' services: postgresql: image: postgres:12-alpine restart: unless-stopped + healthcheck: + test: ["CMD", "pg_isready"] + start_period: 20s + interval: 30s + retries: 5 + timeout: 5s volumes: - database:/var/lib/postgresql/data environment: @@ -16,6 +22,12 @@ services: redis: image: redis:alpine restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "redis-cli ping | grep PONG"] + start_period: 20s + interval: 30s + retries: 5 + timeout: 3s server: image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.5.2} restart: unless-stopped