Default Postgres to 18, add PG_VERSION override#7
Open
labkey-willm wants to merge 1 commit into
Open
Conversation
Flips pg-community from postgres:17 to postgres:${PG_VERSION:-18} so the Community Edition quickstart defaults to Postgres 18, with PG_VERSION as a one-line override for users staying on 17.x data.
Pins PGDATA=/var/lib/postgresql/data because the postgres:18 image moved its default PGDATA to /var/lib/postgresql/18/docker, which would otherwise bypass the bind mount and silently stop persisting data. Version-namespaces the host data dir (./mounts/pgdata/<IDENT>-<PG_VERSION>-data) and un-silences the pg entrypoint so startup errors are visible.
Docs: README gains a PostgreSQL version section with a 17->18 dump/restore path; CLAUDE.md updates the pg version, adds PG_VERSION, and corrects a stale example that used IDENT (pgdata path key) instead of COMPOSE_IMAGE to override the image. Also carries previously-staged commit/PR body formatting conventions in CLAUDE.md.
Co-Authored-By: Claude Opus 4.8 (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.
Rationale
Part of the PostgreSQL 18 migration (LabKey/kanban#1885). Moves the Community Edition quickstart's database default from Postgres 17 to Postgres 18, mirroring the change in LabKey/Dockerfile, while giving existing users a safe path off their 17.x data.
Related Pull Requests
LabKey/Dockerfile#190 (the internal dev docker-compose equivalent).
Changes
Flip
pg-communityfrompostgres:17topostgres:${PG_VERSION:-18};PG_VERSION=17is a one-line override to keep running existing data.Pin
PGDATA=/var/lib/postgresql/data. Thepostgres:18image moved its default PGDATA to/var/lib/postgresql/18/docker, which would otherwise bypass the bind mount and silently stop persisting data.Version-namespace the host data dir (
./mounts/pgdata/<IDENT>-<PG_VERSION>-data) and un-silence the pg entrypoint so startup errors are visible.Docs: README gains a PostgreSQL version section with a 17 -> 18 dump/restore path. CLAUDE.md updates the pg version, adds
PG_VERSION, and corrects a stale example that usedIDENT(which only keys the pgdata path) instead ofCOMPOSE_IMAGEto override the image.🤖 Generated with Claude Code