diff --git a/roles/authentik_docker/templates/authentik-server-docker.service.j2 b/roles/authentik_docker/templates/authentik-server-docker.service.j2 index 217152d..ec4d38f 100644 --- a/roles/authentik_docker/templates/authentik-server-docker.service.j2 +++ b/roles/authentik_docker/templates/authentik-server-docker.service.j2 @@ -5,6 +5,7 @@ Requires=docker.service [Service] ExecStartPre=-/usr/bin/docker rm --force {{ container_names.authentik.server }} +ExecStartPre=-/usr/bin/docker pull ghcr.io/goauthentik/server:{{ version.authentik }} 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 \ --env-file {{ docker_volumes_dir }}/authentik/authentik.env \ @@ -15,7 +16,6 @@ ExecStartPost=/usr/bin/bash -c "/bin/sleep 45 && /usr/bin/docker network connect ExecStop=-/usr/bin/docker stop {{ container_names.authentik.server }} Restart=always RestartSec=60s -TimeoutRestartSec=60s Type=exec [Install] diff --git a/roles/authentik_docker/templates/authentik-worker-docker.service.j2 b/roles/authentik_docker/templates/authentik-worker-docker.service.j2 index c61262f..2c848ff 100644 --- a/roles/authentik_docker/templates/authentik-worker-docker.service.j2 +++ b/roles/authentik_docker/templates/authentik-worker-docker.service.j2 @@ -5,6 +5,7 @@ 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 \ @@ -17,7 +18,6 @@ ExecStartPost=/usr/bin/bash -c "/bin/sleep 45 && /usr/bin/docker network connect ExecStop=-/usr/bin/docker stop {{ container_names.authentik.worker }} Restart=always RestartSec=60s -TimeoutRestartSec=60s Type=exec [Install]