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:
parent
a9667eb0f4
commit
d2be6a8e3a
|
@ -1,10 +1,16 @@
|
||||||
---
|
---
|
||||||
version: '3.2'
|
version: '3.4'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgresql:
|
postgresql:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "pg_isready"]
|
||||||
|
start_period: 20s
|
||||||
|
interval: 30s
|
||||||
|
retries: 5
|
||||||
|
timeout: 5s
|
||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/postgresql/data
|
- database:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
|
@ -16,6 +22,12 @@ services:
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
||||||
|
start_period: 20s
|
||||||
|
interval: 30s
|
||||||
|
retries: 5
|
||||||
|
timeout: 3s
|
||||||
server:
|
server:
|
||||||
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.5.2}
|
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.5.2}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
Reference in New Issue