ansible/roles/authentik_docker/templates/authentik-redis-docker.service.j2

18 lines
599 B
Django/Jinja

[Unit]
Description=Redis with Docker for Authentik
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=-/usr/bin/docker rm --force {{ container_names.authentik.redis }}
ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.redis }} \
--network authentik_net --expose 6379 \
-v {{ docker_volumes_dir }}/authentik/redis:/data \
docker.io/library/redis:alpine --save 60 1 --loglevel warning
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.redis }}
Restart=always
RestartSec=15s
Type=exec
[Install]
WantedBy=multi-user.target