From 03502cf820a767d6aa0528c5c194f44019274ecb Mon Sep 17 00:00:00 2001 From: Maxim Kalina Date: Wed, 29 Apr 2026 00:21:25 +0200 Subject: [PATCH] fix(docker): move Postgres volume mount to /var/lib/postgresql for 18+ Postgres 18 image rejects the previous /var/lib/postgresql/data layout and fails to start, breaking the docker compose up -d quick-start documented in the root README. Mirrors the upstream fix from plugwerk/plugwerk#293 (commit cb00cfe). The volume name (pgdata) is intentionally kept to avoid forcing existing local volumes through an unnecessary rename. Verified locally: - docker compose up -d on an empty volume reaches Postgres Healthy and server /actuator/health UP; /var/lib/postgresql/18 is created as expected. - docker compose down (no -v) followed by up persists data and brings the server back up cleanly. Closes #8 Relates to plugwerk/plugwerk#293 Co-Authored-By: Claude Opus 4.7 (1M context) --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3db8108..15d2bad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,10 @@ services: ports: - "5432:5432" volumes: - - pgdata:/var/lib/postgresql/data + # postgres:18+ requires the volume at /var/lib/postgresql (not /var/lib/postgresql/data) + # so PGDATA can live in a major-version-specific subdirectory alongside config. + # See https://github.com/docker-library/postgres/pull/1259. + - pgdata:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U plugwerk"] interval: 5s