Supabase
Connecting to Supabase Database from a DevZero workspace.
Comprehensive guide for connecting to a Supabase Project from your DevBox.
If you're more of a visual learner, check out the video tutorial!
Architecture Diagram
Here, you will connect to a Supabase Project from your DevBox. This would be done by setting up the cluster in your Project dashboard and accessing it through psql
client tool.
Prerequisites
Before you begin, you should create your account with Supabase and create a new organisation.
Existing Supabase Project
Step 1: Installing dependencies in DevBox
Now we need to install the Postgres psql
client tool.
Follow the below steps to do so:
- Use the following command to reload the local package database:
- Install the PostgresSQL :
Step 2: Connecting with the Project
To make the connection, follow the below steps:
- Go to Supabase Dashboard.
- Open the project which you want to access through the DevBox.
- Click on connect and copy the connection string for
PSQL
.
- Now in your DevBox, simply paste the connection string and enter the password when prompted.
New Supabase Project
If you need to make a new Supabase database and access it through DevBox, then follow the below steps:
Step 1: Creating a Project
- Go to Supabase Dashboard.
- Click on New Project and enter the Organisation, Project name and a strong Database Password.
- Choose your region and click on Create new project.
- Give it a few moments and your project will be ready to use.
Step 2: Installing dependencies in DevBox
Now we need to install the Postgres psql
client tool.
Follow the below steps to do so:
- Use the following command to reload the local package database:
- Install the PostgresSQL :
Step 3: Connecting with the Project
To make the connection, follow the below steps:
- Go to Supabase Dashboard.
- Open the project which you want to access through the DevBox.
- Click on connect and copy the connection string for
PSQL
.
- Now in your DevBox, simply paste the connection string and enter the password when prompted.