Postgres based PGVector- vector store for embeddings. Can be used for AI projects or other usages where you need vectors.
This project setups automatically pgvector extensions to postgres, which otherwise require some manual provisionings.
Use self-hosted vector store for free and for dev envs. Licensed under MIT license.
All PHZ Full Stack -projects should encapsulate all environments by virtualization. Choose one of the following for your project:
Dev
- Docker-compose/Docker
CI
- use dev -env on ci.in.phz.fi + Jenkins executors running Docker or Vagrant/Virtualbox.
- PHZ Jenkins
- Nothing should be run outside virtualization and everything should be wrapped inside the container/virtual machine
- do not pin the projects down on any individual executor, but set up the builds so that they can be run on any executor machine
Staging
- PHZ Docker Swarm
- PHZ Kubernetes
Production
- PHZ Docker Swarm (internal projects only)
- PHZ Kubernetes (internal projects only)
Environments and the configs should be named as
- dev: docker-compose.yml (i.e. use the default names for dev env), but .env.dev
- (ci): use the dev -env on CI
- stg: docker-compose.stg.yml, .env.stg
- prod: docker-compose.prod.yml, .env.prod
Directory structure
- doc/ for UML documents
- etc/ for nginx, ssh etc configs. Can be cp -pr etc/ /etc to the virtual machine during provisioning and matches the os directory structure
- results/ test results
- reports/ for e.g. code coverage reports
- src/ for source code ** Note! Source code should be placed under a single folder (src) that can be mounted over Docker -volume or Vagrant -shared folder inside the virtual machine so that node_modules or vendor directory are not on the shared folder. See https://wiki.phz.fi/Docker and https://wiki.phz.fi/Vagrant for further details how to circumvent the problems.
- tests/ for tests
Add here examples and hints of good ways how to code the project. Convert the silent knowledge as tacit knowledge here.
Note! PHZ Coding Convention: name this environment as dev. Note! However, please use the default files for dev env, such as docker-compose.yml (instead of docker-compose.dev.yml).
./up.sh
Tear down
./down.sh
Status
./status.sh
Database Connection
host.docker.internal:5432
Username: pgvector
Password: <empty>
PSQL
docker ps
docker exec -it phz-pgvector-vector-db-1 psql -U pgvector data
Note! PHZ Coding Convention: name this environment as stg.
Note! PHZ Coding Convention: name this environment as prod.
Add here known information of estimates how fast the chosen technologies and versions will be deprecated.
Add here TODO and blockers that you have found related to upgrading to newer versions. List the library/framework/service, version, and then the error message.