Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Comprehensive guide for connecting to a Supabase Project from your DevBox.
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.
Before you begin, you should create your account with Supabase and create a new organisation.
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 :
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.
If you need to make a new Supabase database and access it through DevBox, then follow the below steps:
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.
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 :
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.
Using a NeonDB database branch from a DevZero workspace.
Basic knowledge of Neon DB and Neon DB branching
Go to Your Project > Project Dashboard.
Click on Branch , create a new branch.
Give it a name and select Current point in time to create the branch off the current state of your main database.
Once the branch is created, please copy the connection string and add it to your user environment secrets. In this guide, it is saved as DATABASE_URL
.
For the purpose of this guide, we will be using a todo app built with nextjs that requires an environment variable called DATABASE_URL
. We will be creating a recipe for this application and we will launch a workspace based on it.
install linux helper packages
clone repo
install nodejs
run npm install
run npm run build
: in this step, we need the database URL to be present so we can run some prisma commands that are required for manipulating the database
npm start
: to start the application
When asked for repository, feel free to use https://github.com/myestery/todo-app or create a fork of it if you want to follow this guide.
We will be implementing the above steps using the recipe file below
The Recipe page has some helper snippet to guide you in generating such files
Now that we have a working recipe, we can create a workspace off it from the recipes page by clicking launch.
Comprehensive guide for connecting to a Timescale Database from your DevBox.
Timescale is an open-source time-series SQL database optimized for fast ingest and complex queries. In this guide, we will walk you through the entire process of connecting your Timescale Database to your DevBox step by step.
Before you begin, create your account with Timescale and create a new organization.
Follow the Connecting to AWS guide to set up the advertise routes for DevBox to access AWS Services. This is necessary since we will use a VPC peering with a timescale database service for a secure connection.
You will need to create a Recipe in DevZero equipped with the necessary tools like psql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
To make your connection secure, we need to create a VPC within the Timescale Infrastructure and then peer it to the AWS VPC:
Go to Timescale Dashboard > VPC.
Click on New VPC and enter the Region, Name and IP Range of the VPC.
Click on Create and after creation, click on Add under VPC Peering column.
Enter your AWS VPC details and click on Add connection.
Follow the below steps to connect to the database instance:
Click on the Service you want to access.
Click the Triple dot dialog menu in the top right corner.
Choose the Change service environment option and go to the VPC tab.
Select the VPC and click on Attach VPC.
Now, with everything set, you just need to use the connection string to access the database:
Click on the Service you want to access.
Scroll down and copy the connection string you see.
Go to DevBox, paste the connection string, and enter the password when prompted:
If you need to make a new Timescale database and access it through DevBox, then follow the below steps:
To make your connection secure, we need to create a VPC within the Timescale Infrastructure and then peer it to the AWS VPC:
Go to Timescale Dashboard > VPC.
Click on New VPC and enter the Region, Name and IP Range of the VPC.
Click on Create, and after creation, click on Add under the VPC Peering column.
Enter your AWS VPC details and click on Add connection.
Click on New Service and pick your service type between Time Series and Analytics and Dynamic PostgreSQL.
Choose the Region, Compute configuration, and Environment type.
In the VPC section choose the vpc you justv created.
Click on Create Service and your database service will be created.
You will need to create a Recipe in DevZero equipped with the necessary tools like psql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch, and your workspace will be created.
Now, with everything set, you just need to use the connection string to access the database:
Click on the Service you want to access.
Scroll down and copy the connection string you see.
Go to DevBox, paste the connection string, and enter the password when prompted.
Comprehensive guide for connecting to Xata Workspace Database from your DevBox.
Xata is a serverless data platform for PostgreSQL that optimizes reliability, scalability, and developer experience. Xata provides features that make it easier to build modern applications, such as Branching, Zero-downtime schema migrations, File attachments, and more. In this guide, we will walk you through the entire process of connecting your Xata Database to your DevBox step by step.
Before you begin, create your account with Xata and create a new Workspace.
Comprehensive guide for connecting to a MongoDB Cluster from your DevBox.
This would be done by setting up the cluster in your Atlas dashboard through one of 3 available cloud providers (AWS, Azure, or GCP) and accessing it through DevBox.
Before you begin, create your account with MongoDB.
MongoDB only supports Private Endpoint access for Dedicated or Serverless clusters. Private Endpoint access for the Shared cluster is not yet supported.
If you need to make a new database cluster and access it through DevBox, then follow the below steps:
Comprehensive guide for connecting to a PlanetScale Database from your DevBox.
PlanetScale is a MySQL based database service which is built on Vitess and unlocks performance, scalability, and cost optimization for hyperscale databases through horizontal sharding. In this guide, we will walk you through the entire process of connecting your PlanetScale Database to your DevBox.
Before you begin, create your account with PlanetScale.
Follow the below steps to generate the connection string for database:
Go to PlanetScale Dashboard.
Click on the database you want to access.
Click on Connect and click on Create password.
Note down the Username and Password generated as it would not be displayed again.
In the Select your language or framework choose the language or framework you want to connect your database with. For this guide, we will be going with MySQL CLI.
Note down the connection string.
You will need to create a Recipe in DevZero equipped with the necessary tools like mysql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below. Remember to replace the placeholder username and password with the value you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Now, with everything set, you just need to use the connection string to access the database:
Go to DevBox.
Use the following command to connect to the database:
If you need to make a new PlanetScale database and access it through DevBox, then follow the below steps:
Go to PlanetScale Dashboard.
Click on Create a new database and enter the Name and Region of your database instance.
Then choose the Cluster size and Autoscaling storage and click on Create database.
Enter the Password name when prompted.
A Username and Password would be generated for you. Note down the password as it would not be displayed again.
In the Select your language or framework choose the language or framework you want to connect your database with. For this guide, we will be going with MySQL CLI.
Note down the connection string.
You will need to create a Recipe in DevZero equipped with the necessary tools like mysql
:
Go to DevZero Dashboard and open the Recipes tab.
Click on New Recipe and enter the recipe's name.
Click on Create a recipe, and your recipe will be created.
Replace the recipe yaml file with the snippet below. Remember to replace the placeholder username and password with the value you noted down in the above steps:
After editing the recipe, click on Save and Build.
When the build is successful, click on Publish.
After the recipe is published, click on Launch and create a new workspace by providing a Workspace Name.
Click on Launch and your workspace will be created.
Now, with everything set, you just need to use the connection string to access the database:
Go to DevBox.
Use the following command to connect to the database: