Add postgres upgrade magic

This commit is contained in:
3wc
2024-01-20 21:24:22 -03:00
parent a9bb848aba
commit e1e9a05be3
3 changed files with 56 additions and 1 deletions

View File

@ -52,13 +52,17 @@ services:
- POSTGRES_USER=root
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_DB=n8n
configs:
- source: db_entrypoint
target: /docker-entrypoint.sh
mode: 0555
secrets:
- db_password
healthcheck:
test: ["CMD", "pg_isready", "-U", "root", "-d", "n8n"]
volumes:
- 'postgresql_data:/var/lib/postgresql/data'
# - ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
entrypoint: /docker-entrypoint.sh
deploy:
labels:
backupbot.backup: "true"
@ -82,3 +86,9 @@ networks:
proxy:
external: true
internal_network:
configs:
db_entrypoint:
name: ${STACK_NAME}_db_entrypoint_${DB_ENTRYPOINT_VERSION}
file: entrypoint.postgres.sh.tmpl
template_driver: golang