- For security, we will load in secrets using 1password.
- See the setup instructions if you do not have 1password CLI.
- You can now prefix commands with
op run --env-file=op.env -- <your command>
and have the secrets loaded automatically. NOTE: you can add the--no-masking
flag before--
to avoid 1password masking terminal.
- Clone the repository.
- Configure needed env variables,
$PG_USER
and$PG_HOST
, either using your own orop.env
, detailed below. - From the root, run:
op run --env-file op.env -- docker compose -f PGv/compose.PGvector.yml up -d --build
(you can remove --build
if you don't want to rebuild the image)
5. Now you have PGv database running on localhost:5432
and an adminer interface on localhost:8080
As above, except for the launch command, for which instead use:
op run --env-file PGv/op.env -- docker compose -f PGv/compose.PGv_remote.yml up -d --build
- All the options in
pg_configs/postgresql.conf
, by defaultmax_connections
to 200 andshared_buffers
to 128mb - Inside of
compose.PGvector.yml
orcompose.PGv_remote.yml
POSTGRES_USER
: The username used to connect to the database.POSTGRES_PASSWORD
: The password used to connect to the database.POSTGRES_DB
: The name of the database created.- Ports can be configured inside
compose.PGvector.yml
From time to time there will be a new tag for the pgvector image. If this bumps PG by a major version, we might decide to delete or migrate the DB.
Danger Zone
To delete & rebuild the DB you can list the volumes
docker volume ls -q
Make sure you're in the correct docker context
The PG one will be in the form "[DBNAME]_db_data"
docker volume rm [VOLUME-ID]
You can slso use docker compose rm -v
to remove any anonymous volumes attached to a container when you remove that container.
If you're trying to delete a volume on your local dev laptop, etc. using the Docker Desktop UI might be a safer bet