Repository navigation
Bump 17 image to 17.11, add a Postgres 18 image and a 17-to-18 upgrade job image - #9
Merged
Merged
Conversation
Dockerfile-17 moves its base from postgres-ssl:17.10 to 17.11, the newest 17.x tag Railway publishes. Dockerfile-18 builds from postgres-ssl:18.6 with postgresql-18-cron, mirroring the 17 image. The build workflow becomes a matrix over majors 17 and 18, publishing ghcr.io/fountain-bio/postgres:<major> and :<major>-<sha> from Dockerfile-<major>. Job names stay postgres-<major>, so the existing postgres-17 check name is unchanged. Dependabot now ignores semver-major bumps of the postgres-ssl base, which is the 17.10 -> 18.6 PR that had to be reverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lhd3gW9wt3QAv5fiZut9ko
Railway's dashboard major upgrade only runs for services on Railway's own postgres-ssl image, so services on ghcr.io/fountain-bio/postgres cannot use it. Dockerfile-upgrade-17-18 extends the job image that flow runs, ghcr.io/railwayapp-templates/postgres-ssl/upgrade:17-18 (pinned by digest), with pg_cron for both majors. Without postgresql-17-cron the old server cannot start, because our volumes preload pg_cron, and without postgresql-18-cron pg_upgrade's loadable-libraries check fails. The build matrix publishes it as ghcr.io/fountain-bio/postgres:upgrade-17-18. The Dockerfile header carries the per-service runbook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lhd3gW9wt3QAv5fiZut9ko
The upgrade image build failed because PGDG's current pg_cron packages depend on postgresql-17 > 17.12 and postgresql-18 > 18.7, while the apt-mark hold kept the base image's 17.11 and 18.6. The runtime images already take that raise from their own pg_cron install (the 17 build moves postgresql-17 from 17.11 to 17.12), so drop the hold and let the upgrade image do the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lhd3gW9wt3QAv5fiZut9ko
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lhd3gW9wt3QAv5fiZut9ko
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
Dockerfile-17moves its base frompostgres-ssl:17.10to17.11, the newest 17.x tag inghcr.io/railwayapp-templates/postgres-ssl.Dockerfile-18builds frompostgres-ssl:18.6(the newest 18.x tag) and installspostgresql-18-cron. It follows the same structure and header as the 17 image.Dockerfile-upgrade-17-18builds a one-shot job image that upgrades a 17 data directory to 18 in place. It starts from Railway's own upgrade job image,ghcr.io/railwayapp-templates/postgres-ssl/upgrade:17-18(pinned by digest), and addspostgresql-17-cronandpostgresql-18-cron. The Dockerfile header has the per-service runbook..github/workflows/build.ymlruns a matrix over17,18andupgrade-17-18. Each entry buildsDockerfile-<image>and publishesghcr.io/fountain-bio/postgres:<image>and:<image>-<sha>. The job name stayspostgres-<image>, so the existingpostgres-17check keeps its name.fail-fast: falsekeeps one image's failure from cancelling the other publishes..github/dependabot.ymlignores semver-major bumps ofrailwayapp-templates/postgres-ssl. This prevents a repeat of the reverted 17.10 to 18.6 PR, because a major bump would point the17tag at a server that cannot read existing 17 data directories.Why a separate upgrade image
Railway's one-click major upgrade (Database > Config > Major Version Upgrade) runs only for services on Railway's official
postgres-sslimage. Railway's upgrade docs state that custom images are not supported, and services built from this repo runghcr.io/fountain-bio/postgres:17. Railway's job image also lacks pg_cron. Volumes running these images preload pg_cron, so in Railway's stock image the 17 server cannot start, and pg_upgrade's loadable-libraries check would fail on the 18 side. Adding pg_cron for both majors fixes both problems.upgrade-job.shcopies the old cluster'sshared_preload_librariesonto the 18 server, and pg_cron returns early from its init underIsBinaryUpgrade, so its scheduler stays off while pg_upgrade runs.The upgrade job requires the volume mounted at
/var/lib/postgresql/data, which is the mount path Railway's 17 template creates.Server minor versions
PGDG builds each pg_cron package against the newest server minor and depends on it. Installing pg_cron therefore raises the bundled server past the base tag's minor: the 17 image runs 17.12 on the 17.11 base, and the 18 image runs 18.7 on the 18.6 base. The 17 image already did this before this PR. The upgrade image takes the same raise, so the 18 binaries that create the new cluster match the 18 runtime image.
Rollout notes
:17to:18alone does not migrate the data. Follow the runbook inDockerfile-upgrade-17-18, which runscheck, thenupgrade, then switches the service to:18.Verification
The pull request CI run builds all three images without publishing, and all three pass. The upgrade image has not been run against a real volume yet. Test it on a copy of a database restored from a backup before using it on a live service.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lhd3gW9wt3QAv5fiZut9ko