Databases
Before you begin, this documentation assumes the following:
You have created an Environment.
Qovery provides access to 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.
Create a database
Navigate to Console
Select your project and environment
Click
Add Database
buttonSelect database type, name, version, mode and accessibility
Deploy the database using
Action
deploy button
Configuration
General
Modes
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. They are perfect for development and testing, as they are significantly cheaper than services provided by cloud providers.
Please refers to the dedicated database sub-pages to get more information on the supported mode for each of our database types.
Versions
Please refers to the dedicated database sub-pages to get more information on the supported versions and all database configuration specificities.
You can adjust the version of your database in General
section of database settings:
Accessibility
To make your database secure, you may decide not to expose it publicly.
- Public access will make your database accessible via the public network
- Private access will make your database accessible only by applications in your environment
You can configure the accessibility settings in General
section of database settings:
Resources
CPU
To tweak CPU configuration of your database, navigate to Resource
section in database settings:
Memory
To tweak RAM configuration of your database, navigate to Resource
section in database settings:
Storage
To tweak the disk space assigned to your database, navigate to Resource
section in the database settings:
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:
Name | Description | Example |
---|---|---|
QOVERY<DATABASE_TYPE> <DBID> _DEFAULT_DATABASE_NAME | Env Var containing the default database name | postgres |
QOVERY<DATABASE_TYPE> <DBID> _HOST | Env 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_INTERNAL | Env Var containing the internal hostname of the database (if you need access it from within the cluster network) | zf5206c84-postgresql |
QOVERY<DATABASE_TYPE> <DBID> _LOGIN | Env Var containing the username of the DB | superuser |
QOVERY<DATABASE_TYPE> <DBID> _PORT | Env Var containing the port to be used for connecting to the DB | 5432 |
QOVERY<DATABASE_TYPE> <DBID> _HOST | Secret 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_INTERNAL | Secret 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> _PASSWORD | Secret containing the password of the DB | dbsecret |
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.