do not consider it an error if the containers cannot be stopped if they do not exist

This commit is contained in:
erebion 2023-09-15 21:44:43 +02:00
parent e8273f3667
commit 8b93465483
4 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@ ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.db }} --n
--env-file {{ docker_volumes_dir }}/authentik/authentik.env --expose 5432 \
-v {{ docker_volumes_dir }}/authentik/database:/var/lib/postgresql/data \
docker.io/library/postgres:{{ authentik_postgres_version }}
ExecStop=/usr/bin/docker stop {{ container_names.authentik.db }}
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.db }}
Restart=always
RestartSec=30s
TimeoutStartSec=30s

View file

@ -9,7 +9,7 @@ ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.redis }}
--network authentik_net --expose 6379 \
-v {{ docker_volumes_dir }}/authentik/redis:/data \
docker.io/library/redis:alpine --save 60 1 --loglevel warning
ExecStop=/usr/bin/docker stop {{ container_names.authentik.redis }}
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.redis }}
Restart=always
RestartSec=15s
Type=exec

View file

@ -12,7 +12,7 @@ ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.server }}
-v {{ docker_volumes_dir }}/authentik/custom-templates:/templates \
ghcr.io/goauthentik/server:{{ version.authentik }} server
ExecStartPost=/usr/bin/bash -c "/bin/sleep 10 && /usr/bin/docker network connect nginx_net {{ container_names.authentik.server }}"
ExecStop=/usr/bin/docker stop {{ container_names.authentik.server }}
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.server }}
Restart=always
RestartSec=60s
TimeoutRestartSec=60s

View file

@ -14,7 +14,7 @@ ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.worker }}
-v {{ docker_volumes_dir }}/authentik/custom-templates:/templates \
ghcr.io/goauthentik/server:{{ version.authentik }} 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 }}
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.worker }}
Restart=always
RestartSec=60s
TimeoutRestartSec=60s