23 lines
960 B
Text
23 lines
960 B
Text
|
[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 }} --network authentik_net \
|
||
|
--expose 9000 --expose 9443 \
|
||
|
--env-file {{ docker_volumes_dir }}/authentik/authentik.env \
|
||
|
-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 }} server worker
|
||
|
ExecStartPost=/usr/bin/bash -c "/bin/sleep 10 && /usr/bin/docker network connect nginx_net {{ container_names.authentik.worker }}"
|
||
|
ExecStop=/usr/bin/docker stop {{ container_names.authentik.worker }}
|
||
|
Restart=always
|
||
|
RestartSec=15s
|
||
|
Type=exec
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|