Deployment
vecs
is compatible with any Postgres 13+ with the pgvector extension installed.
In the following we show we show instructions for hosting a database on Supabase and locally in docker since both are fast and free.
Supabase
Cloud Hosted
Create an account
Create a supabase account at https://app.supabase.com/sign-up.
Create a new project
Select New Project
Complete the prompts. Be sure to remember or write down your password as we’ll need that when connecting with vecs.
Connection Info
On the project page, navigate to Settings
> Database
> Database Settings
and substitue those fields into the conenction string
i.e.
Keep that connection string secret and safe. Its your DB_CONNECTION
in the quickstart guide,
Local
You can also use Supabase locally on your machine. Doing so will keep your project setup consistent when deploying to hosted Supabase.
Install the CLI
To install the CLI, use the relevant system instructions below
Start the Project
From your project directory, create the supabase/
sub-directory required for supabase projects by running:
next start the application using:
which will download the latest Supabase containers and provide a URL to each service:
The service we need for vecs
is DB URL
. Note it down for use as our DB_CONNECTION
For more info on running a local Supabase project, checkout the Supabase CLI guide
Docker
Install docker if you don’t have it already at Get Docker
Start the Postgres Container
Next, run
Connection Info
Substitue the values from the previous section into the postgres conenction string
i.e.
Keep that connection string secret and safe. Its your DB_CONNECTION
in the quickstart guide