root: make redis persistent in docker-compose

fixes compose repeatedly creating new volumes on updates

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-09-04 00:30:47 +02:00
parent f68ed3562e
commit fc6ed8e7f9
1 changed files with 7 additions and 2 deletions

View File

@ -3,7 +3,7 @@ version: '3.4'
services: services:
postgresql: postgresql:
image: postgres:12-alpine image: docker.io/library/postgres:12-alpine
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
@ -20,7 +20,8 @@ services:
env_file: env_file:
- .env - .env
redis: redis:
image: redis:alpine image: docker.io/library/redis:alpine
command: --save 60 1 --loglevel warning
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"] test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
@ -28,6 +29,8 @@ services:
interval: 30s interval: 30s
retries: 5 retries: 5
timeout: 3s timeout: 3s
volumes:
- redis:/data
server: server:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.8.2} image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.8.2}
restart: unless-stopped restart: unless-stopped
@ -85,5 +88,7 @@ services:
volumes: volumes:
database: database:
driver: local driver: local
redis:
driver: local
geoip: geoip:
driver: local driver: local