Databases

Qovery natively lets you deploy and access the most popular SQL and NoSQL databases available on the major cloud providers. Reliability and resiliency are at the heart of their services, so you don't have to worry about your data on Qovery.

Qovery natively supports the following databases:

  • PostgreSQL
  • MySQL
  • MongoDB
  • Redis

Qovery can natively operate a database in two different ways (called "Mode"):

  • As a Docker Container: Testing / dev : Qovery can provide the database as Docker container with attached persistent storage directly on your Kubernetes cluster (1 instance). They are perfect for development and testing, as they are significantly cheaper than services provided by cloud providers. In the Qovery UI these will be called Databases in Container mode
  • As a Cloud provider managed database: Qovery can create and manage the lifecycle of a cloud provider managed database instance (for example via RDS on AWS). These are perfect for production since they guarantee the right level of resiliance, performance and data security best practices. In the Qovery UI these will be called Databases in Managed mode

If the natively supported databases and operation modes are not enough for you, we can still offer you an alternative solution depending on your use case:

  • Use an existing DB on a dedicated VPC: your applications can access this database via VPC peering. Have a look at this guide for more information.
  • Create my own database: You will be able to manage the lifecycle of this database using the lifecycle jobs. Have a look at this example which allows you to deploy your custom RDS instance on AWS via Terraform.

The following sections will show you how you can create and manage the databases natively supported by Qovery. For any other use case, please refer to the guides provided above.

Create a database

  1. Navigate to Console

  2. Select your project and environment

  3. Click Add Database button

    Database

  4. Select database type, name, description (optional), version, mode and accessibility

    General Information

  5. If you are using the database in `Container` mode, you can set the CPU, RAM and storage that will be assigned to the instance running the docker image of the database.

    Resources

  6. At the end a recap will allow you to just create the database or create and deploy it

    Recap

Configuration

Once created, you can access the configuration of a database at any time via the Settings tab available on the database page

Database Settings

You can find below the description of each of the tabs available in this section

General

Modes

As described at the beginning of this document, databases can operate in two modes:

  • Managed
  • Container

Managed databases are perfect for production - they are provided and managed by major cloud providers like AWS to make sure your production data is well managed.

Container databases are managed by Qovery as Docker containers with attached persistent storage directly on your Kubernetes cluster (1 instance). They are perfect for development and testing, as they are significantly cheaper than services provided by cloud providers.

Please refer to the dedicated database sub-pages to get more information on the supported mode for each cloud provider.

Versions

We regularly update the version available for each database. Please refer to the dedicated database sub-pages to get more information on the supported version for each database types and cloud provider.

Accessibility

This parameter let you decide to expose publicly or not your database.

  • Public access will make your database accessible via the public network
  • Private access will make your database accessible only by applications in your environment

Resources

This section is available only for databases in Container mode

CPU / Memory

You can select the CPU assigned to the Kuerbetes pod running the database instance

Storage

You can select the size of the persistant storage attached to the container database.

Credentials and connectivity

When a database is created in your environment, Qovery will automatically create and inject a set of BUILT_IN environment variables containing all the parameters necessary to your application to connect to the database.

This is the list of environment variables and secrets that will be automatically created:

NameDescriptionExample
QOVERY<DATABASE_TYPE><DBID>_DEFAULT_DATABASE_NAMEEnv Var containing the default database namepostgres
QOVERY<DATABASE_TYPE><DBID>_HOSTEnv Var containing the external hostname of the database (if you need access from the outside and the DB is configured with visibility "PUBLIC")zf5206c84-postgresql.oom.sh
QOVERY<DATABASE_TYPE><DBID>_HOST_INTERNALEnv Var containing the internal hostname of the database (if you need access it from within the cluster network)zf5206c84-postgresql
QOVERY<DATABASE_TYPE><DBID>_LOGINEnv Var containing the username of the DBsuperuser
QOVERY<DATABASE_TYPE><DBID>_PORTEnv Var containing the port to be used for connecting to the DB5432
QOVERY<DATABASE_TYPE><DBID>_HOSTSecret containing the external URI to be used for connecting to the DB (if you need access from the outside and the DB is configured with visibility "PUBLIC")sql://root:[email protected]:27017/admin
QOVERY<DATABASE_TYPE><DBID>_HOST_INTERNALSecret containing the internal URI to be used for connecting to the DB (if you need access it from within the cluster network)sql://root:[email protected]:27017/admin
QOVERY<DATABASE_TYPE><DBID>_PASSWORDSecret containing the password of the DBdbsecret

Please note that the built-in variables follow the naming pattern: QOVERY_DATABASETYPE + <your_db_name> + <type_of_variable> where:

  • <your_db_name> is the name of your database
  • <type_of_variable> is the type of variable we inject, e.g. PASSWORD, VERSION, CONNECTION_URI and so on.

To know how to access your database from your application, have a look at the database section.

Delete your database instance

  1. Navigate to Console

  2. Select your environment and database

  3. In database overview, click on Action remove button

    Database Remove

Available Databases

Mongodb
Mysql
Postgresql
Redis