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

19 lines
599 B
Text
Raw Permalink Normal View History

[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