ansible/roles/docker_pretix/templates/pretix-redis.service.j2

14 lines
472 B
Django/Jinja

[Unit]
Description=Redis for Pretix with Docker
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=-/usr/bin/docker rm --force {{ pretix_redis_container_name }}
ExecStart=/usr/bin/docker run --name {{ pretix_redis_container_name }} --network pretix --label com.centurylinklabs.watchtower.enable={WATCHTOWER_ENABLED} redis
ExecStop=/usr/bin/docker stop {{ pretix_redis_container_name }}
Restart=always
RestartSec=15s
[Install]
WantedBy=multi-user.target