Skip to content

Start postgres:18+ images: pin PGDATA below the data mount - #11

Merged
PhilDL merged 1 commit into
mainfrom
fix/postgres-18-data-dir
Sep 14, 2026
Merged

PhilDL merged 1 commit into
mainfrom
fix/postgres-18-data-dir

Conversation

@PhilDL

@PhilDL PhilDL commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

postgres:18+ images refuse to start when a volume is mounted on /var/lib/postgresql/data, their pre-18 default data directory (docker-library/postgres#1259). The generated db service mounted exactly there, so any postgresImage: "postgres:18.x" config produced a db container in a restart loop and setup failed after 60 readiness probes.

Fix: set PGDATA=/var/lib/postgresql/data/pgdata on the db service. The mount is unchanged, and this layout is accepted by every major from 13 to 18 (verified with postgres:16 and postgres:18.6). Stacks created before this release keep their old data directory root; reset-db rebuilds them on the new layout.

  • Regression test in test/core/compose-model.test.ts
  • README default note
  • Version bumped to 0.1.0-beta.21; tag v0.1.0-beta.21 after merge to publish

Validated end to end on a real project: setup (full module install + template snapshot) and test on postgres:18.6.

https://claude.ai/code/session_01WgWTM3kM3C2eLM6wcZuMhU

postgres:18+ images abort when a volume is mounted on their pre-18 default
data directory (/var/lib/postgresql/data), which is exactly what the
generated db service did. An explicit PGDATA one level below the mount is
accepted by every major from 13 to 18, so the mount stays where it is and
existing configs keep working; stacks created before this pick the new
layout up with `reset-db`.

Release v0.1.0-beta.21.

Claude-Session: https://claude.ai/code/session_01WgWTM3kM3C2eLM6wcZuMhU
@PhilDL
PhilDL merged commit 11594cf into main Sep 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant