29 lines
666 B
YAML
29 lines
666 B
YAML
postgres:
|
|
deploy:
|
|
replicas: 1
|
|
environment:
|
|
POSTGRES_PASSWORD_FILE: "/run/secrets/postgres-root"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
start_period: 20s
|
|
interval: 30s
|
|
retries: 5
|
|
timeout: 5s
|
|
hostname: "postgres"
|
|
image: "postgres:16"
|
|
logging:
|
|
driver: journald
|
|
networks:
|
|
- homelab
|
|
restart: on-failure
|
|
secrets:
|
|
- postgres-root
|
|
- gitea
|
|
- authentik-postgres
|
|
shm_size: 128mb
|
|
user: "10003:10003"
|
|
volumes:
|
|
- "/srv/data/docker/postgres/data:/var/lib/postgresql/data:rw"
|
|
- type: tmpfs
|
|
target: "/var/run/postgresql"
|