ansible/roles/authentik/templates/authentik.service.j2

35 lines
692 B
Plaintext
Raw Normal View History

2023-07-17 17:45:45 +02:00
[Unit]
Description=authentik service using docker compose
Requires=docker.service
After=docker.service
Before=nginx.service
[Service]
Type=simple
2023-07-17 17:45:45 +02:00
User=authentik
Group=authentik
Restart=always
TimeoutStartSec=1200
WorkingDirectory=/opt/authentik
# Make sure no old containers are running
ExecStartPre=/usr/bin/docker-compose down -v
# Update images
ExecStartPre=-/usr/bin/docker-compose pull --quiet
2023-07-17 17:45:45 +02:00
# Compose up
ExecStart=/usr/bin/docker-compose up
2023-07-17 17:45:45 +02:00
# Compose down, remove containers and volumes
ExecStop=/usr/bin/docker-compose down -v
# Refresh on reload
ExecReload=-/usr/bin/docker-compose pull --quiet
ExecReload=/usr/bin/docker-compose up -d
2023-07-17 17:45:45 +02:00
[Install]
WantedBy=multi-user.target