|
@@ -0,0 +1,29 @@
|
|
|
|
+[Unit]
|
|
|
|
+Description=Quay PostgreSQL Container
|
|
|
|
+Wants=network-online.target
|
|
|
|
+After=network-online.target
|
|
|
|
+
|
|
|
|
+[Service]
|
|
|
|
+Restart=on-failure
|
|
|
|
+TimeoutStopSec=30
|
|
|
|
+ExecStartPre=/usr/bin/podman rm --ignore -f postgresql
|
|
|
|
+ExecStart=/usr/bin/podman run \
|
|
|
|
+ --conmon-pidfile %t/%n-pid \
|
|
|
|
+ --cidfile %t/%n-cid \
|
|
|
|
+ --cgroups=no-conmon \
|
|
|
|
+ --name=postgresql -d \
|
|
|
|
+ --network=quay \
|
|
|
|
+ -v /local/quay-pg:/var/lib/pgsql/data:Z \
|
|
|
|
+ -e POSTGRESQL_USER=quay \
|
|
|
|
+ -e POSTGRESQL_PASSWORD=secret \
|
|
|
|
+ -e POSTGRESQL_DATABASE=quay \
|
|
|
|
+ -e POSTGRESQL_ADMIN_PASSWORD=verysecret \
|
|
|
|
+ registry.redhat.io/rhel9/postgresql-15:latest
|
|
|
|
+ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%n-cid -t 30 && \
|
|
|
|
+ /bin/rm -f %t/%n-pid %t/%n-cid
|
|
|
|
+Type=forking
|
|
|
|
+PIDFile=%t/%n-pid
|
|
|
|
+KillMode=none
|
|
|
|
+
|
|
|
|
+[Install]
|
|
|
|
+WantedBy=default.target
|