diff --git a/docs/src/deployment/configuration.md b/docs/src/deployment/configuration.md index d3b726e5..981fc68e 100644 --- a/docs/src/deployment/configuration.md +++ b/docs/src/deployment/configuration.md @@ -121,6 +121,36 @@ spring: validate-on-migrate: true ``` +### PostgreSQL extensions + +IDP-Core depends on PostgreSQL extensions. They must be installed in the target database before running schema migrations that rely on them. + +#### For local development (Docker Compose) + +Use the provided initialization script in your `docker-compose.yml`: + +```yaml title="docker-compose.yml" +services: + postgres: + image: postgres:15 + volumes: + - ./scripts/init-extensions.sql:/docker-entrypoint-initdb.d/01-init-extensions.sql +``` + +The script runs automatically on container initialization via the `docker-entrypoint-initdb.d` directory. + +#### For production + +There are several options depending on your context: + +- Provision extensions directly via your Infrastructure as Code (for example Terraform resources) +- Enable extensions in your cloud provider's database management dashboard +- Apply the provided initialization script (`/scripts/init-extensions.sql`) using `psql` from your deployment host + +Key note: + +Installing extensions requires superuser privileges or a role with `CREATE` extension privileges. If your application user lacks these, handle installation as a separate DBA step during provisioning. + --- ## Application Settings