Files
homelab-infra/infra/postgresql17/docker-compose.yml
T

34 lines
859 B
YAML

services:
postgresql17:
image: postgres:18.4@sha256:8ff36f3c66371cba71d20ceedccfc3de9669a68737607888c4ef0af93abe8e39
container_name: postgresql17
restart: unless-stopped
environment:
TZ: Europe/Berlin
POSTGRES_USER: mailarchiver
POSTGRES_DB: mailarchiver
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
PGDATA: /var/lib/postgresql/18/docker
volumes:
- /mnt/user/appdata/postgresql18:/var/lib/postgresql
- /mnt/user/appdata/secrets/postgres_password.txt:/run/secrets/postgres_password:ro
networks:
- backend_net
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mailarchiver -d mailarchiver"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
networks:
backend_net:
external: true