Custom PostgreSQL
To configure a custom PostgreSQL instance for production deployment, you need to modify the Hasura environment variables in the values.yaml file. Add the variables listed below under the environment section of the Hasura configuration.
Environment Variables for Custom PostgreSQL
| Name | Type | Description | Required |
|---|---|---|---|
| HASURA_GRAPHQL_METADATA_DATABASE_URL | String | Connection string for the metadata database used by Hasura. | Yes |
| HASURA_GRAPHQL_DATABASE_URL | String | Connection string for the primary application database used by Hasura. | Yes |
- Do not remove any variables already present under the
hasura.environmentsection.- Simply add the variables listed above under the
hasura.environmentsection.
Connection String Format
Hasura expects PostgreSQL connection strings to follow this structure:
postgresql://<username>:<password>@<host>:<port>/<database>
Example:
postgresql://admin:password123@db.example.com:5432/repoflow
Parameters Explained:
<username>: The username used to authenticate with the PostgreSQL server.<password>: The password associated with the username.<host>: The hostname or IP address of your PostgreSQL server.<port>: The port on which your PostgreSQL server is running (default:5432).<database>: The name of the PostgreSQL database.
Ensure that the provided connection strings point to your custom PostgreSQL instance and have the correct credentials and database details.