ansible-edda/playbooks/roles/services/deploy/database/templates/systemd/container-database-pgadmin-chown.service

30 lines
1.2 KiB
Desktop File

[Unit]
Description=Podman container-database-pgadmin-chown.service
Documentation=man:podman-generate-systemd(1)
After=pod-database.service
Before=container-database-pgadmin.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-database-pgadmin-chown.pid %t/container-database-pgadmin-chown.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-database-pgadmin-chown.pid \
--cidfile %t/container-database-pgadmin-chown.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-database.pod-id \
--replace \
-v {{ services_data_directory }}/pod-database/pgadmin/_data:/var/lib/pgadmin \
-v ./.config/service/pgadmin.password:/run/secrets/pgadmin.password \
--user=0 \
--entrypoint="/bin/sh" \
--name=pod-database-pgadmin-chown \
docker.io/dpage/pgadmin4:{{ services_service_deploy_versions.pgadmin4 }} \
-c "chown -R 5050:5050 /var/lib/pgadmin /run/secrets/pgadmin.password"
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-database-pgadmin-chown.ctr-id
Type=oneshot
[Install]
WantedBy=container-database-pgadmin.service