homelab/proxmox/services/docker-based/postgres.yml
2026-04-01 16:07:44 -04:00

23 lines
531 B
YAML

version: '3.8'
# Deploy with:
# docker stack deploy -c postgres.yml postgres
#
# Runs on: POSTGRES_INSTANCE (ip-10-0-1-173)
# Creates databases and users for all services on first boot via init scripts.
# Data is persisted in a named Docker volume on the postgres node.
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: