Repository navigation
feat(image): PostgreSQL 18 + PostGIS 3.6 + PGroonga image - #1
Merged
Merged
Conversation
Built FROM postgres:18-trixie, the same base as postgis/postgis:18-3.6, so it can replace that image on an existing volume. PostGIS comes from apt.postgresql.org and PGroonga from Groonga's apt repository; the PostGIS and PGroonga minor lines are asserted after install so a new minor never ships silently. First start creates template_postgis and the postgis, pg_trgm and pgroonga extensions in it and in POSTGRES_DB. update-extensions.sh brings the extensions' SQL up to the libraries after an image upgrade. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018F1vLVP6KU7yzZ23Eaf8H2
test/smoke.sh starts the image on an empty volume and asserts each extension works (geography distance, trigram word similarity, PGroonga search over Japanese, Chinese, Korean and English through its index), then runs the health check and update-extensions.sh and prints the bundled versions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018F1vLVP6KU7yzZ23Eaf8H2
build.yml builds and smoke-tests the image on PRs that touch it. release.yml runs release-please and, on a release, builds, smoke-tests and only then pushes ghcr.io/rawback-app/db with <version>, <pg>-<postgis>, <pg> and latest tags read from the Dockerfile ARGs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018F1vLVP6KU7yzZ23Eaf8H2
README covers tags, quick start (docker run and a podman quadlet), first-start behaviour, PGroonga usage, migrating from postgis/postgis:18-3.6, upgrades, development and GHCR access. AGENTS.md (CLAUDE.md links to it) holds the invariants. The Node .gitignore template is replaced with one for this repo. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018F1vLVP6KU7yzZ23Eaf8H2
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
|
@claude review |
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
This sets up the repo as the image builder for one shared Postgres image,
ghcr.io/rawback-app/db: PostgreSQL 18, PostGIS 3.6 and PGroonga 4.0 on Debian trixie, built forlinux/amd64.postgis/postgis:18-3.6. It uses the same base image (postgres:18-trixie), the samePGDATAand the sametemplate_postgis. The current server database can switch images on its existing volume, with no dump and restore.PG_MAJORis a build arg, so moving to 19 later is a one-line change plus a data migration.postgresql-18-pgdg-pgroonga) from Groonga's own apt repo. The PostGIS and PGroonga minor versions are checked after install. A new minor version fails the build instead of shipping by itself; patch releases are picked up automatically.initdb/10-rawback-extensions.sh) createstemplate_postgisand thepostgis,pg_trgmandpgroongaextensions in it and inPOSTGRES_DB.update-extensions.sh(in the image's$PATH) updates the extensions' SQL in every database after an image upgrade.pg_isready -h 127.0.0.1. It uses TCP, so it stays unhealthy while the init-only server is running.test/smoke.sh,make test). It checks:template_postgisexist;ST_DWithinquery on geography points;<%operator;update-extensions.sh.build.ymlbuilds the image and runs the smoke test on PRs that touch it. It doesn't push.release.ymlruns release-please. When a release is created, it builds the image, smoke-tests that exact build, then pushes<version>,18-3.6,18andlatestto GHCR.docker runand a podman quadlet, PGroonga usage, migrating from postgis/postgis, upgrades and GHCR access.AGENTS.md(withCLAUDE.mdas a symlink) covers the rules that must hold. The Node.gitignoretemplate is replaced.Testing
Buildworkflow is the real build check. Its job summary lists the versions it resolved.docker build --checkreports no warnings, andshellcheckandbash -npass on every script.update-extensions.sh, the health check andtest/smoke.shagainst a stand-in image built frompostgis/postgis:18-3.6, with the PGroonga parts removed:Follow-ups
ghcr.io/rawback-app/db:18-3.6. Merge it only after this repo's first release has been published.🤖 Generated with Claude Code
https://claude.ai/code/session_018F1vLVP6KU7yzZ23Eaf8H2
Generated by Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.