From f121098957c34848467b123ca29dc9762e1c9c36 Mon Sep 17 00:00:00 2001 From: Andre Mainka Date: Thu, 26 May 2022 09:56:00 +0200 Subject: [PATCH] root: Add docker-compose postgresql and redis healthchecks (#2958) * Add healthchecks to docker compose Add healthchecks for postgresql and redis, see als #2519 * bump docker-compose version to 3.4 --- docker-compose.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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