Enviar arquivos para "postgres"
Commit da stack do Postgres.
This commit is contained in:
49
postgres/postgres-stack.yaml
Normal file
49
postgres/postgres-stack.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: "automacao"
|
||||
POSTGRES_PASSWORD: "/run/secrets/postgres16"
|
||||
PGDATA: /var/lib/postgresql/data/pgdata
|
||||
TZ: America/Sao_Paulo
|
||||
secrets:
|
||||
- postgres16
|
||||
ports:
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- postgres_network
|
||||
volumes:
|
||||
- postgres16_data:/var/lib/postgresql/data
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
resources:
|
||||
limits:
|
||||
cpus: "1"
|
||||
memory: "1024M"
|
||||
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:
|
||||
postgres16_data:
|
||||
external: true
|
||||
|
||||
networks:
|
||||
postgres_network:
|
||||
driver: overlay
|
||||
attachable: true
|
||||
external: true
|
||||
|
||||
secrets:
|
||||
postgres16:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user