Files

24 lines
695 B
Go Template

[Unit]
Description=PostgreSQL database server
Documentation=man:postgres(1)
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
User=postgres
{{- range $key, $value := $.Spec.MetaStore.Spec.Env }}
Environment={{ $key }}={{ $value }}
{{ end }}
{{- if and $.Metadata.Annotations (index $.Metadata.Annotations "foundry.o11y.io/metastore-postgres-binary-path") }}
{{- $metastoreBinaryPath := index $.Metadata.Annotations "foundry.o11y.io/metastore-postgres-binary-path" }}
ExecStart={{ $metastoreBinaryPath }} -D /usr/local/pgsql/data
{{- end }}
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=infinity
[Install]
WantedBy=multi-user.target