Managed Postgres
Sometimes you want to use your own PostgreSQL database instead of the one provided by Supervisely. For example, you may want to use your own database for security reasons or because you already have a PostgreSQL database running in your infrastructure, or you require high availability and fault tolerance.
In this case, you will have to configure Supervisely to use your own database instead of the one provided by default.
Managed Postgres providers examples: Amazon RDS, Google Cloud SQL, Azure Database for PostgreSQL, etc.
Configuration
To configure Supervisely to use your own database, you will have to edit the .env
file which you can find in the workdir of your Supervisely installation. You can find the folder by running this command:
The .env
file contains the following lines:
which is used in docker-compose.yml
as:
In case you don't have POSTGRES_SSL in your configuration, you will have to upgrade your Supervisely installation to the latest version (at least 6.8.47).
You will have to change the values of the variables to match your database configuration. For example, if you are using Amazon RDS, you will have to change the values to something like this:
After that you will need to redeploy Supervisely services:
In case you get errors or "License not found", please contact Supervisely support and attach the troubleshoot archive
Database migration
If you're migrating to Amazon RDS you can follow this guide as well.
In case you already have your valuable data in a local Supervisely database then you will need to transfer it to the new database. The migration is rather simple and can be done in a few steps:
Stop Supervisely services and export your local database using
pg_dump
:
Restore the database dump to your own database:
Last updated