Skip to main content
Version: 6.12.0

PostgreSQL Database Configuration

If PostgreSQL is the DBMS to be used, ensure it is installed before performing any other step.

Define Connection Parameters

Add the following connection parameters to application.properties file:

spring.datasource.url=jdbc:postgresql://<host>:<port>/<database_name>
spring.datasource.username=<database_username>
spring.datasource.password=<database_password>

An example of a valid spring.datasource.url is jdbc:postgresql://localhost:5432/portal

tip

As an alternative to storing credentials in application.properties, you can provide them through environment variables (SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD). This is recommended for production environments. See Secure Elasticsearch and database credentials for details.