Getting Started With Scalingo for PostgreSQL®
Adding Scalingo for PostgreSQL® to Your App
Once you have chosen the right plan for your needs, you are ready to provision the addon. This can be done via our dashboard, our CLI tool or via our Terraform Provider.
Using the Dashboard
- From your web browser, open your dashboard
- Click on the application for which you want to add a PostgreSQL® database
- Click on the Resources tab
- Locate the Addons block and click on the Add an addon button
- Select PostgreSQL® in the databases block and click the Go to plan selection button
- Select the plan you want to provision
- Click the Finish button
- Give the platform a few seconds to ship your database and enjoy!
Using the Command Line
- Make sure you have correctly setup the Scalingo command line tool
- From the command line, list the plans available for
postgresql
:scalingo --app my-app addons-plans postgresql
The output should look like this:
+----------------------------+---------------+ | ID | NAME | +----------------------------+---------------+ | postgresql-sandbox | Sandbox | | postgresql-starter-512 | Starter 512M | | postgresql-starter-1024 | Starter 1G | ...
- Locate the
ID
corresponding to the plan you want to deploy (for examplepostgresql-starter-512
) - Provision the addon:
scalingo --app my-app addons-add postgresql <plan_ID>
The output should look like this:
-----> Addon postgresql has been provisionned ID: my_app_wxyz Message from addon provider: Database is being provisioned
- Wait a few seconds for the addon to be provisioned and enjoy!
Using the Terraform Provider
- Place the following
resource
block in your Terraform file to create the addon and attach it to your app:resource "scalingo_addon" "my-db" { provider_id = "postgresql" plan = "postgresql-starter-512" app = "${scalingo_app.my-app.id}" }
In this example, we create a PostgreSQL Starter 512 addon named
my-db
and attach it to an app namedmy-app
(which must exist). We could have done the same with another plan. - Run
terraform plan
and check if the result looks good - If so, run
terraform apply
- After a few seconds, your database is ready to use. Enjoy!
Accessing the PostgreSQL® Dashboard
Every PostgreSQL® addon comes with its dedicated dashboard, generally referred to as database dashboard, which is the central place for administrative tasks such as:
- Monitoring the database through logs, metrics and statistics
- Upgrading the database engine version
- Enabling specific features
- Managing database users
- Managing backups
You can access the database dashboard via the application dashboard:
- From your web browser, open your dashboard
- Click on the application for which you want to manage your database
- Click on the Overview tab
- Locate the Addons block and click on the Dashboard button next to the database you want to manage.
Last update: 22 Nov 2023
Suggest edits