Atualizar postgres/postgres.yaml

This commit is contained in:
2025-03-26 17:45:31 +00:00
parent 16d2fee0ed
commit 7b324f04d2

51
postgres/postgres.yaml Normal file
View File

@@ -0,0 +1,51 @@
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: "automacao"
POSTGRES_PASSWORD_FILE: "/run/secrets/db_user_automacao"
PGDATA: /var/lib/postgresql/data/pgdata
TZ: America/Sao_Paulo
secrets:
#- postgres16
- db_user_automacao
ports:
- "25721:5432"
networks:
- postgres_network
volumes:
- postgres_data:/var/lib/postgresql/data
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: "1"
memory: "2048M"
update_config:
parallelism: 1
delay: 10s
rollback_config:
parallelism: 1
monitor: 30s
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
external: true
networks:
postgres_network:
driver: overlay
attachable: true
external: true
secrets:
postgres16:
external: true
db_user_automacao:
external: true