24 lines
1 KiB
Django/Jinja
24 lines
1 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 }}
|
|
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 \
|
|
ghcr.io/goauthentik/server:{{ version.authentik }} worker
|
|
ExecStartPost=/usr/bin/bash -c "/bin/sleep 45 && /usr/bin/docker network connect nginx_net {{ container_names.authentik.worker }}"
|
|
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.worker }}
|
|
Restart=always
|
|
RestartSec=60s
|
|
TimeoutRestartSec=60s
|
|
Type=exec
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|