fix(docker): move Postgres volume mount to /var/lib/postgresql for 18+#11
Merged
Conversation
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) <noreply@anthropic.com>
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.
Summary
Postgres 18 image rejects the previous
/var/lib/postgresql/datamount layout, sodocker compose up -dfrom the repo root fails — breaking the quick-start documented in the rootREADME.md.This PR mirrors the upstream fix from plugwerk/plugwerk#293 (commit
cb00cfe): mount the volume at/var/lib/postgresqlinstead, with the same explanatory comment pointing at docker-library/postgres#1259.The volume name (
pgdata) is intentionally kept to avoid an unnecessary rename for existing local volumes.Diff
```diff
volumes:
```
Migration note for existing local volumes
Any `examples_pgdata` volume created before this fix is unusable with Postgres 18 and should be removed once:
```bash
docker compose down -v # or: docker volume rm examples_pgdata
```
No data loss concern — the previous setup never successfully ran with PG 18, so the volume only contains demo data from earlier PG versions, if anything.
Test plan
Closes #8
Relates to plugwerk/plugwerk#293