Start postgres:18+ images: pin PGDATA below the data mount - #11
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 generateddbservice mounted exactly there, so anypostgresImage: "postgres:18.x"config produced a db container in a restart loop andsetupfailed after 60 readiness probes.Fix: set
PGDATA=/var/lib/postgresql/data/pgdataon the db service. The mount is unchanged, and this layout is accepted by every major from 13 to 18 (verified withpostgres:16andpostgres:18.6). Stacks created before this release keep their old data directory root;reset-dbrebuilds them on the new layout.test/core/compose-model.test.ts0.1.0-beta.21; tagv0.1.0-beta.21after merge to publishValidated end to end on a real project:
setup(full module install + template snapshot) andtestonpostgres:18.6.https://claude.ai/code/session_01WgWTM3kM3C2eLM6wcZuMhU