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

39 lines
1.6 KiB
Desktop File

[Unit]
Description=Podman container-database-pgadmin.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
BindsTo=pod-database.service container-database-postgres.service
Requires=container-database-pgadmin-chown.service
After=pod-database.service container-database-postgres.service container-database-pgadmin-chown.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-database-pgadmin.pid %t/container-database-pgadmin.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-database-pgadmin.pid \
--cidfile %t/container-database-pgadmin.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-database.pod-id \
--replace \
--label "io.containers.autoupdate=image" \
--log-driver=journald \
-dt \
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
-v {{ services_data_directory }}/pod-database/pgadmin/_data:/var/lib/pgadmin \
-v ./.config/service/pgadmin.password:/run/secrets/pgadmin.password:ro \
-e PGADMIN_DEFAULT_EMAIL="{{ services[services_service_name].pgadmin.email }}" \
-e PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin.password \
--name=pod-database-pgadmin \
docker.io/dpage/pgadmin4:{{ services_service_deploy_versions.pgadmin4 }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-database-pgadmin.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-database-pgadmin.ctr-id
PIDFile=%t/container-database-pgadmin.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target