zephyrdark 2858c87b1b fix: use named volume for production PostgreSQL to prevent data loss
Two issues caused DB reset on every deploy:

1. docker-compose.prod.yml used bind mount (./data/postgres) with
   PostgreSQL 18's incompatible /var/lib/postgresql/data path.

2. The Gitea CI runner shares Docker socket with the host, but
   ./data/postgres resolves to a temp path inside the runner container.
   Each deploy creates a fresh workspace, so the bind mount always
   points to an empty directory on the host.

Fix: Use a named Docker volume (same as docker-compose.yml dev config).
Named volumes are managed by Docker daemon directly, survive container
recreation, and don't depend on working directory resolution.

Also fix deploy.yml: remove unnecessary mkdir for data dirs, write
backup to /tmp instead of relative path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:47:46 +09:00
..