home-pods/container-hass-postgres.ser...

32 lines
949 B
SYSTEMD
Raw Normal View History

2022-02-14 18:11:23 +01:00
[Unit]
Description=Podman container-hass-postgres.service
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
BindsTo=pod-home-assistant.service
After=pod-home-assistant.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm \
--pod-id-file %t/pod-home-assistant.pod-id \
--sdnotify=conmon --replace -d \
--name=hass-postgres \
-e POSTGRES_USER=home-assistant \
-e POSTGRES_PASSWORD=home-assistant \
-e POSTGRES_DB=home-assistant \
--net=host \
2022-07-02 15:04:51 +02:00
-v hass-postgres:/var/lib/postgresql/data:Z \
2022-02-14 18:11:23 +01:00
--label "io.containers.autoupdate=registry" \
docker.io/postgres:14
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
2022-07-02 15:04:51 +02:00
WantedBy=default.target