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
This commit is contained in:
Andre Mainka 2022-05-26 09:56:00 +02:00 committed by Jens Langhammer
parent 4ff32af343
commit f121098957
1 changed files with 13 additions and 1 deletions

View File

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