From c4304615ec08cdb32f4315197e653c9c80c385e8 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sat, 23 May 2026 14:22:15 +0530 Subject: [PATCH] chore(dev): align dev Postgres to pg18 matching production MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Production runs Postgres 18; the dev compose file pinned pg16. A pg_dump from prod (v18) cannot be restored by a v16 pg_restore — the dump header is rejected. Matching the major version fixes restores and removes a latent source of dev/prod behaviour drift. Also adopts the pg18 image's data-directory convention: the volume now mounts at /var/lib/postgresql (the image places data in a version subdirectory), and drops the obsolete compose 'version' key. --- docker-compose.dev.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 11fd9d7..6f367e3 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,8 +1,11 @@ -version: '3.8' - +# Local development services for Tia (Postgres + Redis). +# Postgres major version is pinned to match production. services: postgres: - image: pgvector/pgvector:pg16 + # pg18 to match production (Hetzner prod runs Postgres 18). + # Keeping dev on the same major version avoids dump/restore mismatches + # and version-specific behaviour drift. + image: pgvector/pgvector:pg18 container_name: tia-postgres environment: POSTGRES_DB: tia_dev @@ -11,7 +14,9 @@ services: ports: - "5433:5432" volumes: - - ./data/postgres:/var/lib/postgresql/data + # pg18 image convention: mount at /var/lib/postgresql (NOT .../data). + # The image places data in a version-specific subdirectory under it. + - ./data/postgres:/var/lib/postgresql - ./docker/init-db:/docker-entrypoint-initdb.d healthcheck: test: ["CMD-SHELL", "pg_isready -U tia -d tia_dev"]