Run local development and CI on PostgreSQL with pgvector - #6
Merged
Merged
Conversation
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.
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 containerpgvector/pgvector:0.6.0-pg16,bound to
127.0.0.1:5433.env.example: PostgreSQL is now the default for local developmentREADME.md: the setup starts the database container before migratingpostgres:16Why pgvector 0.6.0
Ubuntu 24.04 ships
postgresql-16-pgvector0.6.0, which is what the serverwill install. Pinning the same version locally and in CI keeps features that
only exist in newer releases (such as
halfvecor iterative index scans) frompassing 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
migrateagainst the container: all migrations appliedseed_demorun twice: identical totals (5 users, 6 offers, 18 packages,5 reviews), no duplicated media files
makemigrations --check: no changes detectedProduction impact
None. The server keeps its own
.envand does not use Docker.compose.ymlis ignored there.