Skip to content

Run local development and CI on PostgreSQL with pgvector - #6

Merged
B-Blarr merged 3 commits into
mainfrom
assistant-postgres
Sep 23, 2026
Merged

B-Blarr merged 3 commits into
mainfrom
assistant-postgres

Conversation

@B-Blarr

@B-Blarr B-Blarr commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Stage 1 of the portfolio assistant. Local development moves from the SQLite
fallback to PostgreSQL 16 with pgvector, the same engine the server runs.
CI switches to the same image.

Changes

  • compose.yml: local PostgreSQL container pgvector/pgvector:0.6.0-pg16,
    bound to 127.0.0.1:5433
  • .env.example: PostgreSQL is now the default for local development
  • README.md: the setup starts the database container before migrating
  • CI: the test service uses the same image instead of postgres:16

Why pgvector 0.6.0

Ubuntu 24.04 ships postgresql-16-pgvector 0.6.0, which is what the server
will install. Pinning the same version locally and in CI keeps features that
only exist in newer releases (such as halfvec or iterative index scans) from
passing here and failing in production. The tag also freezes PostgreSQL at
16.1. Minor releases only carry fixes, so that difference is acceptable.

Why port 5433

It leaves 5432 free for a natively installed PostgreSQL on the developer
machine.

Verification

  • migrate against the container: all migrations applied
  • seed_demo run twice: identical totals (5 users, 6 offers, 18 packages,
    5 reviews), no duplicated media files
  • makemigrations --check: no changes detected
  • Test suite: 57 tests OK, coverage 81 %, identical to the SQLite run

Production impact

None. The server keeps its own .env and does not use Docker.
compose.yml is ignored there.

@B-Blarr
B-Blarr merged commit 4dd5197 into main Sep 23, 2026
3 checks passed
@B-Blarr
B-Blarr deleted the assistant-postgres branch September 23, 2026 19:40
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