2023-09-13 18:03:24 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Authentik with Docker
|
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=-/usr/bin/docker rm --force {{ container_names.authentik.server }}
|
2023-11-16 10:48:52 +01:00
|
|
|
ExecStartPre=-/usr/bin/docker pull ghcr.io/goauthentik/server:{{ version.authentik }}
|
2023-09-15 21:22:16 +02:00
|
|
|
ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.server }} \
|
|
|
|
--network authentik_net --publish 127.0.0.1:9000:9000 --publish 127.0.0.1:9443:9443 \
|
2023-09-13 18:03:24 +02:00
|
|
|
--env-file {{ docker_volumes_dir }}/authentik/authentik.env \
|
|
|
|
-v {{ docker_volumes_dir }}/authentik/media:/media \
|
|
|
|
-v {{ docker_volumes_dir }}/authentik/custom-templates:/templates \
|
|
|
|
ghcr.io/goauthentik/server:{{ version.authentik }} server
|
2023-09-15 21:53:56 +02:00
|
|
|
ExecStartPost=/usr/bin/bash -c "/bin/sleep 45 && /usr/bin/docker network connect nginx_net {{ container_names.authentik.server }}"
|
2023-09-15 21:44:43 +02:00
|
|
|
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.server }}
|
2023-09-13 18:03:24 +02:00
|
|
|
Restart=always
|
2023-09-15 21:37:11 +02:00
|
|
|
RestartSec=60s
|
2023-09-13 18:03:24 +02:00
|
|
|
Type=exec
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|