Skip to content

Add PostGIS to the image - #5

Merged
joszz merged 1 commit into
mainfrom
add-postgis
Nov 5, 2026
Merged

joszz merged 1 commit into
mainfrom
add-postgis

Conversation

@joszz

@joszz joszz commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Install postgresql-${PG_MAJOR}-postgis-3 and -scripts from the PGDG apt repo already configured in the base image. Because the package name uses PG_MAJOR, it follows a Postgres major upgrade without an edit.
  • No preload needed, so CMD / shared_preload_libraries stays as it is.
  • The smoke test now creates postgis, postgis_topology and postgis_raster, runs ST_Transform (PROJ) and ST_Buffer (GEOS), and checks that an ST_DWithin query uses a GiST index.
  • The README documents the available extensions and the postgis_extensions_upgrade() step after a PostGIS version change.

Needed for Dawarich, which requires PostGIS.

Testing

I built the image locally and ran the workflow's smoke test against it, and it passed. It ships PostGIS 3.7.0 with GEOS 3.15, PROJ 9.9 and GDAL 3.13. The image is now 698 MB.

🤖 Generated with Claude Code

Install postgresql-${PG_MAJOR}-postgis-3 (and its scripts package) from the
PGDG apt repo in the base image, alongside pgvector. PostGIS needs no
preloading, so CMD is unchanged.

The smoke test now creates the PostGIS extensions, checks that PROJ and GEOS
load, and verifies a GiST index is used for an ST_DWithin query. The README
documents the extensions and the postgis_extensions_upgrade() step after
version changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joszz
joszz merged commit ac4c0cc into main Nov 5, 2026
1 check passed
@joszz
joszz deleted the add-postgis branch November 5, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant