Database
Warning
PactFlow On-Premises 1.x is now in maintenance mode and receives security updates only. It will no longer be supported after March 11, 2026.
To benefit from the latest features and improvements, upgrade to version 2.x as soon as possible.
A PostgreSQL database is required for storage of the application data.
Important
If you would like to migrate an existing PostgreSQL database, skip this section and instead follow the guide here.
Supported versions
PostgreSQL version 10.6 and later are supported.
Database creation
Log in as your database administrator and execute the following statements in an SQL session.
CREATE USER pactflow_user WITH PASSWORD '<password>'; CREATE DATABASE pactflow; GRANT ALL PRIVILEGES ON DATABASE pactflow TO pactflow_user; REVOKE ALL ON DATABASE pactflow FROM PUBLIC;
SSL
The application's PostgreSQL SSL mode is set to require
by default, which means it requires the connection to the database to be encrypted but does not verify the server's certificate. See the documentation for the PACTFLOW_DATABASE_SSLMODE environment variable for more options. It is not recommended to use any option weaker than require
.
Authentication
Username/password authentication
Database access between the PactFlow On-Premises application and Postgres instance can be secured using a username and password, configured via environment variables.
AWS IAM authentication
When deploying PactFlow On-Premises on AWS Cloud infrastructure, database access between the PactFlow On-Premises application and the RDS Postgres instance can be secured using IAM. Please see the AWS RDS IAM documentation for more information.
The following environment variables must be set for the PactFlow On-Premises application:
PACTFLOW_DATABASE_ADAPTER="postgresiam"
PACTFLOW_DATABASE_USERNAME
PACTFLOW_DATABASE_HOST
PACTFLOW_DATABASE_PORT
PACTFLOW_DATABASE_NAME
PACTFLOW_DATABASE_SSLMODE="require"
AWS_REGION
Schema migrations
The database schema migrations will be run automatically on start-up. See the documentation on Database migrations for more information.
Migrating from OSS Pact Broker to PactFlow On-Premises
If you have been hosting your own instance of the open-source Pact Broker, you can point the new PactFlow On-Premises On-Premises application at the same database, and the missing migrations will be applied.
Schema
