{"id":51328734,"url":"https://github.com/fclairamb/postgis-pgvector","last_synced_at":"2026-07-01T21:03:13.537Z","repository":{"id":366530184,"uuid":"1276393187","full_name":"fclairamb/postgis-pgvector","owner":"fclairamb","description":"PostgreSQL 18 + PostGIS + pgvector in one image. Auto-updated by Renovate, auto-released (version mirrors PostgreSQL, patch auto-increments).","archived":false,"fork":false,"pushed_at":"2026-06-22T07:38:32.000Z","size":16,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-22T09:25:34.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fclairamb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-21T23:33:28.000Z","updated_at":"2026-06-22T07:38:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fclairamb/postgis-pgvector","commit_stats":null,"previous_names":["fclairamb/postgis-pgvector"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fclairamb/postgis-pgvector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fpostgis-pgvector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fpostgis-pgvector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fpostgis-pgvector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fpostgis-pgvector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fclairamb","download_url":"https://codeload.github.com/fclairamb/postgis-pgvector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fpostgis-pgvector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35022610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-01T21:03:12.802Z","updated_at":"2026-07-01T21:03:13.528Z","avatar_url":"https://github.com/fclairamb.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postgis-pgvector\n\nPostgreSQL **18** with both [PostGIS](https://postgis.net/) and\n[pgvector](https://github.com/pgvector/pgvector) in a single image — the two\nextensions the official images never ship together — **built from a pinned\nDebian snapshot** for reproducible, self-contained builds.\n\n```\nghcr.io/fclairamb/postgis-pgvector\n```\n\nMulti-arch: `linux/amd64` + `linux/arm64`.\n\n## Quick start\n\n```bash\ndocker run -d --name pg \\\n  -e POSTGRES_PASSWORD=postgres \\\n  -p 5432:5432 \\\n  ghcr.io/fclairamb/postgis-pgvector:18\n```\n\nPostGIS and pgvector are enabled in the default database (and in\n`template_postgis`) out of the box:\n\n```sql\nSELECT postgis_full_version();\nSELECT extversion FROM pg_extension WHERE extname IN ('postgis', 'vector');\n```\n\nFor any **other** database, enable them yourself:\n\n```sql\nCREATE EXTENSION IF NOT EXISTS postgis;\nCREATE EXTENSION IF NOT EXISTS vector;\n```\n\nThere's a [`docker-compose.yml`](docker-compose.yml) with a persistent volume\nand a healthcheck.\n\n\u003e [!IMPORTANT]\n\u003e **PostgreSQL 18 changed the data directory.** The persistent volume now mounts\n\u003e at `/var/lib/postgresql` (it was `/var/lib/postgresql/data` on 17 and earlier).\n\u003e If you're migrating an existing setup, update your volume mount or Postgres\n\u003e will come up with an empty data directory.\n\n## How it's built\n\nInstead of layering on a prebuilt `postgres`/`postgis` image, the\n[`Dockerfile`](Dockerfile) **reconstructs the stack on a pinned Debian\nsnapshot** (`debian:trixie-20260623-slim`):\n\n1. the official [`postgres`](https://github.com/docker-library/postgres) image\n   (18/trixie) — PostgreSQL from the PGDG apt repo, plus gosu, locale, the\n   `postgres` user and the entrypoint — vendored verbatim (trimmed to the\n   amd64/arm64 binary path);\n2. PostGIS, the way [`docker-postgis`](https://github.com/postgis/docker-postgis)\n   (18-3.6) does — `postgresql-18-postgis-3` from PGDG + its init/upgrade scripts;\n3. pgvector, compiled from a pinned source tag.\n\nThe upstream entrypoint and init scripts are checked into this repo verbatim\n(`docker-entrypoint.sh`, `docker-ensure-initdb.sh`, `initdb-postgis.sh`,\n`update-postgis.sh`) so behaviour matches the official images exactly.\n\n## Tags \u0026 versioning\n\nThe release version mirrors **PostgreSQL's** version, and our own builds only\never move the **patch** digit:\n\n```\n\u003cPG_MAJOR\u003e.\u003cPG_MINOR\u003e.\u003cpatch\u003e\n        18  .  4      .  0\n        │       │         └─ our build counter — incremented every release\n        │       └─────────── PostgreSQL minor (e.g. 18.4), from PG_VERSION\n        └─────────────────── PostgreSQL major\n```\n\nPostgreSQL only uses two numbers (`18.4`, `18.5`, …), which leaves the third\nfree for us. CI reads `PG_VERSION` from the Dockerfile, and the patch resets to\n`0` whenever that MAJOR.MINOR changes.\n\n| Tag         | Meaning                                   | Moves?  |\n|-------------|-------------------------------------------|---------|\n| `18.4.0`    | One exact, immutable build                | never   |\n| `18.4`      | Latest patch for PostgreSQL 18.4          | moving  |\n| `18`        | Latest build for PostgreSQL 18.x          | moving  |\n| `latest`    | Latest build, period                      | moving  |\n\n## Pinning \u0026 reproducibility\n\nEvery input is pinned in the Dockerfile:\n\n| Input        | Pinned as                          | Updated by |\n|--------------|------------------------------------|------------|\n| Debian base  | `FROM debian:trixie-20260623-slim` | Renovate (digest + newer snapshots) |\n| PostgreSQL   | `ENV PG_VERSION` (PGDG apt version)| **manual** bump |\n| PostGIS      | `ENV POSTGIS_VERSION` (PGDG apt)   | **manual** bump |\n| gosu         | `ENV GOSU_VERSION`                 | Renovate |\n| pgvector     | `ARG PGVECTOR_VERSION` (source tag)| Renovate |\n| GitHub Actions | workflow `uses:`                 | Renovate |\n\nTo move PostgreSQL or PostGIS, edit `PG_VERSION` / `POSTGIS_VERSION` to a\nversion available in the [PGDG `trixie-pgdg`](https://apt.postgresql.org/pub/repos/apt/dists/trixie-pgdg/)\nrepo and commit — CI cuts the matching release. (They're bumped by hand because\nRenovate can't reliably track PGDG apt version strings.)\n\n\u003e Note: pinning the Debian *image* freezes the base layer, but `apt-get install`\n\u003e still resolves against the live Debian/PGDG mirrors at build time. For\n\u003e bit-for-bit reproducibility you'd additionally pin a `snapshot.debian.org`\n\u003e sources list — out of scope here.\n\n## How it stays up to date\n\n[`renovate.json`](renovate.json) auto-merges non-major updates to the Debian\nbase image (digest + newer dated snapshots), gosu, pgvector, and the GitHub\nActions. **Major** bumps (Debian release, pgvector `0.x → 1.x`, …) open a PR for\nyou to review. A Renovate merge → push to `main` → the release workflow\n([`.github/workflows/release.yml`](.github/workflows/release.yml)) rebuilds\nmulti-arch, pushes all four tags to GHCR, and cuts a GitHub release. You can\nalso trigger it manually (`workflow_dispatch`).\n\n## One-time repo setup\n\n**Enable the [Renovate app](https://github.com/apps/renovate)** on this repo\n(no secrets needed; its auto-merges trigger the release workflow). The GHCR\npackage is already public — anonymous `docker pull` works.\n\n## What's inside\n\n- **Debian** — `debian:trixie-20260623-slim` (pinned)\n- **PostgreSQL 18** — `PG_VERSION` from PGDG\n- **PostGIS 3.6** — `POSTGIS_VERSION` from PGDG\n- **pgvector** — compiled from source (`PGVECTOR_VERSION`; JIT bitcode disabled,\n  no effect on query results)\n\n## Licensing\n\nThe packaging in this repo is [MIT](LICENSE). The image bundles Debian,\nPostgreSQL, PostGIS, and pgvector, each under its own license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffclairamb%2Fpostgis-pgvector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffclairamb%2Fpostgis-pgvector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffclairamb%2Fpostgis-pgvector/lists"}