###
### lldap-db - podman quadlet file
### https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
###

[Unit]
Description=LLDAP-DB container
Documentation=https://hub.docker.com/_/postgres
# likely only needed for Podman < 5.3 (see containers/podman#22197 and #24637)
After=podman-user-wait-network-online.service

[Service]
Restart=on-failure

[Container]
AutoUpdate=registry
ContainerName=lldap-db
Image=docker.io/postgres:17

# this is optional to keep db/web services separate
Network=lldap-backend.network

# health check
HealthCmd=pg_isready -U lldapuser -d lldap
HealthInterval=5s
HealthRetries=3
HealthStartPeriod=15s
HealthTimeout=30s

# environment variables
Environment=POSTGRES_DB=lldap
Environment=POSTGRES_PASSWORD=lldappass
Environment=POSTGRES_USER=lldapuser

Volume=lldap-db.volume:/var/lib/postgresql/data:Z

[Install]
WantedBy=default.target
