This repository has been archived on 2025-11-16. You can view files and clone it, but cannot push or open issues or pull requests.
Files
swarm-production/stacks/core/postgres/stack.yml
John Allison f91d4852ba
Some checks failed
Deploy to Swarm / deploy (push) Failing after 2s
relaunch
2025-10-25 12:44:05 -04:00

27 lines
535 B
YAML

services:
postgres:
image: postgres:17-alpine
secrets:
- postgres-master
networks:
- homelab
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres-master
- PGDATA=/var/lib/postgresql/data
volumes:
- /mnt/swarm-data/postgres:/var/lib/postgresql/data
ports:
- 5432:5432
deploy:
replicas: 1
placement:
constraints:
- node.hostname == p0
networks:
homelab:
external: true
secrets:
postgres-master:
external: true