2023-09-13 18:03:24 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Postgres for Authentik with Docker
|
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=-/usr/bin/docker rm --force {{ container_names.authentik.db }}
|
|
|
|
ExecStart=/usr/bin/docker run --rm --name {{ container_names.authentik.db }} --network authentik_net \
|
|
|
|
--env-file {{ docker_volumes_dir }}/authentik/authentik.env --expose 5432 \
|
|
|
|
-v {{ docker_volumes_dir }}/authentik/database:/var/lib/postgresql/data \
|
2023-12-01 23:09:29 +01:00
|
|
|
--label=com.centurylinklabs.watchtower.enable=false \
|
2023-09-13 18:03:24 +02:00
|
|
|
docker.io/library/postgres:{{ authentik_postgres_version }}
|
2023-09-15 21:44:43 +02:00
|
|
|
ExecStop=-/usr/bin/docker stop {{ container_names.authentik.db }}
|
2023-09-13 18:03:24 +02:00
|
|
|
Restart=always
|
2023-09-15 21:22:16 +02:00
|
|
|
RestartSec=30s
|
|
|
|
TimeoutStartSec=30s
|
2023-09-13 18:03:24 +02:00
|
|
|
Type=exec
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|