HAPI Postgres Configuration
HAPI PostgreSQL reads .hapi-postgres.env when it creates the database used to store FHIR resources.
Environment variables
Section titled “Environment variables”Set every variable below. The values in the repository are examples for local setup. Generate a separate database password for each production installation and store it as a secret.
| Variable | Default Value | Explanation |
|---|---|---|
POSTGRES_DB |
hapi |
The name of the PostgreSQL database created on initialization. |
POSTGRES_USER |
admin |
The superuser username for the database. |
POSTGRES_PASSWORD |
<HAPI_DB_PASSWORD> |
Secret. Use a unique generated password; this must match the HAPI database connection configuration. |
POSTGRES_HOST_AUTH_METHOD |
md5 |
The authentication method used for host connections. md5 ensures password-based authentication is required. |
POSTGRES_INITDB_ARGS |
--auth-host=md5 |
Arguments passed to initdb during initial database creation, enforcing md5 authentication from the start. |

