fix(compose): rename postgres volume to force fresh init with current password
Some checks are pending
CI / lint + typecheck + tests (push) Waiting to run
CI / docker build + push (push) Blocked by required conditions

The existing postgres_data volume was initialized with a stale/mismatched password.
Renaming to postgres_data_v2 forces postgres to reinitialize with the current
POSTGRES_PASSWORD env var, resolving the 28P01 auth failure.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
barodine 2026-05-02 10:33:33 +00:00
parent 1ed91f715b
commit 7ece5367a4

View file

@ -31,9 +31,7 @@ services:
- 'coolify.name=agenthub' - 'coolify.name=agenthub'
- 'coolify.type=application' - 'coolify.type=application'
- 'traefik.enable=true' - 'traefik.enable=true'
# Tell Traefik which Docker network to use for routing
- 'traefik.docker.network=coolify' - 'traefik.docker.network=coolify'
# HTTPS router for agenthub.barodine.net
- 'traefik.http.routers.agenthub.rule=Host(`agenthub.barodine.net`)' - 'traefik.http.routers.agenthub.rule=Host(`agenthub.barodine.net`)'
- 'traefik.http.routers.agenthub.entrypoints=websecure' - 'traefik.http.routers.agenthub.entrypoints=websecure'
- 'traefik.http.routers.agenthub.tls=true' - 'traefik.http.routers.agenthub.tls=true'
@ -57,7 +55,7 @@ services:
POSTGRES_INITDB_ARGS: '--encoding=UTF8 --locale=C' POSTGRES_INITDB_ARGS: '--encoding=UTF8 --locale=C'
PGDATA: /var/lib/postgresql/data/pgdata PGDATA: /var/lib/postgresql/data/pgdata
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data_v2:/var/lib/postgresql/data
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-agenthub} -d ${POSTGRES_DB:-agenthub}'] test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-agenthub} -d ${POSTGRES_DB:-agenthub}']
@ -124,7 +122,7 @@ services:
- 'ofelia.job-exec.backup-daily.command=/usr/local/bin/backup.sh' - 'ofelia.job-exec.backup-daily.command=/usr/local/bin/backup.sh'
volumes: volumes:
postgres_data: postgres_data_v2:
driver: local driver: local
labels: labels:
- 'coolify.managed=true' - 'coolify.managed=true'