-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostgresql-app.service
More file actions
38 lines (35 loc) · 1.36 KB
/
postgresql-app.service
File metadata and controls
38 lines (35 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# Copyright (C) 2022 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#
[Unit]
Description=Podman postgresql-app.service
BindsTo=formbricks.service
After=formbricks.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%S/state/database.env
# EnvironmentFile=%S/state/secrets/passwords.secret
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/postgresql-app.pid %t/postgresql-app.ctr-id
ExecStartPre=/bin/mkdir -p %S/state/restore/
ExecStart=/usr/bin/podman run --conmon-pidfile %t/postgresql-app.pid \
--cidfile %t/postgresql-app.ctr-id --cgroups=no-conmon \
--pod-id-file %t/formbricks.pod-id --replace -d --name postgresql-app \
--env-file=%S/state/environment \
--volume postgres-data:/var/lib/postgresql/data:Z \
--volume %S/state/restore/:/docker-entrypoint-initdb.d/:Z \
--env-file=%S/state/database.env \
--env TZ=UTC \
${PGVECTOR_IMAGE}
ExecStartPost=/usr/bin/bash -c "while ! podman exec postgresql-app psql -U postgres -d ${POSTGRES_DB} ; do sleep 5 ; done"
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/postgresql-app.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/postgresql-app.ctr-id
ExecReload=/usr/bin/podman kill -s HUP postgresql-app
SyslogIdentifier=%u
PIDFile=%t/postgresql-app.pid
Type=forking
[Install]
WantedBy=default.target