Files
kontor/service/container/kontor-postgres.service
Thomas Peetz 8a5bc7873a
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
change usage of secret
2026-09-16 16:57:42 +02:00

49 lines
1.2 KiB
Desktop File

# kontor-postgres.service
# autogenerated by Podman 4.9.3
# Sun Apr 19 16:28:14 CEST 2026
[Unit]
Description=Podman kontor-postgres.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
BindsTo=pod-kontor.service
After=pod-kontor.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStart=/usr/bin/podman run \
--cidfile=%t/%n.ctr-id \
--cgroups=no-conmon \
--rm \
--pod-id-file %t/pod-kontor.pod-id \
--sdnotify=conmon \
-d \
--replace \
--name postgres \
--secret source=pg_password,type=env,target=POSTGRES_PASSWORD \
-e POSTGRES_DB=kontor \
-e POSTGRES_USER=kontor \
-e POSTGRES_HOST_AUTH_METHOD=scram-sha-256 \
-v kontor-db:/var/lib/postgresql/data \
--health-cmd="pg_isready -U kontor || exit 1" \
--health-interval=1s \
--health-timeout=5s \
--health-retries=10 \
docker.io/library/postgres:17
ExecStop=/usr/bin/podman stop \
--ignore -t 10 \
--cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm \
-f \
--ignore -t 10 \
--cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=default.target