26 lines
1.2 KiB
Django/Jinja
26 lines
1.2 KiB
Django/Jinja
[Unit]
|
|
Description=Authentik Worker with Docker
|
|
After=docker.service
|
|
Requires=docker.service
|
|
|
|
[Service]
|
|
ExecStartPre=-/usr/bin/docker rm --force {{ container_names.authentik.worker }}
|
|
ExecStartPre=-/usr/bin/docker pull ghcr.io/goauthentik/server:{{ version.authentik }}
|
|
ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.worker }} --user root \
|
|
--network authentik_net --expose 9000 --expose 9443 \
|
|
--env-file {{ docker_volumes_dir }}/authentik/authentik.env \
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
-v {{ docker_volumes_dir }}/authentik/media:/media \
|
|
-v {{ docker_volumes_dir }}/authentik/certs:/certs \
|
|
-v {{ docker_volumes_dir }}/authentik/custom-templates:/templates \
|
|
--label=com.centurylinklabs.watchtower.enable=false \
|
|
ghcr.io/goauthentik/server:{{ version.authentik }} worker
|
|
ExecStartPost=/usr/bin/bash -c "/bin/sleep 120 && /usr/bin/docker network connect nginx_net {{ container_names.authentik.worker }}"
|
|
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.worker }}
|
|
Restart=always
|
|
RestartSec=60s
|
|
TimeoutStartSec=infinity
|
|
Type=exec
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|