Skip to content

Configuration reference ​

VerifiedOperational guidance

Verified anchors ​

text
.env.pm
docker-compose.pm.yml
NGB.PropertyManagement.Api/appsettings.Development.json
NGB.PropertyManagement.BackgroundJobs/appsettings.Development.json
NGB.PropertyManagement.Watchdog/appsettings.Development.json
ui/ngb-property-management-web/.env
NGB.Migrator.Core/PlatformMigratorCli.cs
NGB.Migrator.Core/README.md

Scope of this page ​

This page documents the concrete configuration keys in the Property Management example. The same patterns are used by Trade, Agency Billing, and CRM with vertical-specific prefixes and port values.

Configuration shape ​

In the verified PM example, configuration is split across four surfaces:

  1. appsettings*.json for host defaults and structured sections.
  2. docker-compose.pm.yml for container-time overrides and secrets wiring.
  3. .env.pm for local port, image-tag, bootstrap, and secret values consumed by Docker Compose.
  4. UI .env files for Vite runtime configuration.

For the migrator CLI, command-line flags are primary and selected environment variables are supported as fallbacks.

Environment file groups (.env.pm) ​

GroupExample keysWhat they control
Build and certificatesBUILD_CONFIGURATION, ASPNET_CERT_PASS, ASPNET_CERT_PATHContainer build mode and HTTPS certificate mounting
Host portsPM_API_HTTP_PORT, PM_API_HTTPS_PORT, PM_BACKGROUNDJOBS_HTTPS_PORT, PM_WATCHDOG_HTTPS_PORT, PM_WEB_HTTP_PORTPublished local ports for PM hosts
ObservabilitySEQ_IMAGE_TAG, SEQ_HTTP_HOST_PORT, SEQ_URL, SEQ_API_KEYSeq image/version and ingestion target
PostgreSQLPOSTGRES_HOST_PORT, POSTGRES_ADMIN_USER, PM_DB_NAME, PM_DB_USER, PM_DB_PASSWORDDatabase server, admin, and app-database credentials
Demo bootstrapPM_DEMO_SEED_ENABLED, PM_DEMO_DATASET, PM_DEMO_SEED_FROM, PM_DEMO_SEED_TOLocal demo seeding behavior for PM
KeycloakKEYCLOAK_PUBLIC_URL, KEYCLOAK_REALM, KEYCLOAK_PM_API_CLIENT_ID, KEYCLOAK_PM_WEB_CLIENT_IDRealm, client ids, admin bootstrap, and public URLs
Content featuresFEATURE_ATTACHMENTS, FEATURE_NOTES, ATTACHMENTS_UPLOAD_EXPIRATION_ENABLEDAPI feature availability and database-only expiration of pending uploads
MinIOMINIO_IMAGE_REPOSITORY, MINIO_IMAGE_TAG, MINIO_IMAGE_DIGEST, MINIO_BUCKET, MINIO_INTERNAL_ENDPOINT, MINIO_PUBLIC_ENDPOINT, MINIO_CORS_ORIGINSLocal storage image, bucket, service/browser endpoints and permitted browser origins
Supporting toolsPGADMIN_HTTP_HOST_PORT, PGADMIN_DEFAULT_EMAILOptional local support tools

API host ​

The PM API host uses the following configuration keys in the verified development and Docker Compose setup.

KeySourceMeaning
ConnectionStrings:DefaultConnectionappsettings.Development.json, docker-compose.pm.ymlPrimary PostgreSQL application connection string
KeycloakSettings:Issuerappsettings.Development.json, docker-compose.pm.ymlJWT issuer / Keycloak realm URL
KeycloakSettings:ClientIds[]appsettings.Development.jsonAccepted audiences for bearer tokens
KeycloakSettings:RequireHttpsMetadatadocker-compose.pm.ymlLocal-development toggle for Keycloak metadata retrieval
ExternalLinksSettings:HealthUiUrlappsettings.Development.json, docker-compose.pm.ymlExternal menu link to Watchdog UI
ExternalLinksSettings:BackgroundJobsUiUrlappsettings.Development.json, docker-compose.pm.ymlExternal menu link to Hangfire dashboard
ASPNETCORE_ENVIRONMENTdocker-compose.pm.ymlASP.NET Core environment name
ASPNETCORE_URLSdocker-compose.pm.ymlHTTP/HTTPS host binding
ASPNETCORE_HTTPS_PORTSdocker-compose.pm.ymlPublished HTTPS container port
ASPNETCORE_Kestrel__Certificates__Default__Pathdocker-compose.pm.ymlMounted certificate path
ASPNETCORE_Kestrel__Certificates__Default__Passworddocker-compose.pm.ymlMounted certificate password
Serilog__WriteTo__1__Args__serverUrldocker-compose.pm.ymlSeq ingestion URL

PM API development defaults ​

SettingExample value
ConnectionStrings:DefaultConnectionsubstituted from .env.pm / Compose
KeycloakSettings:Issuer${KEYCLOAK_PUBLIC_URL}/realms/${KEYCLOAK_REALM}
KeycloakSettings:ClientIds[]ngb-pm-api, ngb-pm-web-client, ngb-tester
ExternalLinksSettings:HealthUiUrlhttps://localhost:7075/health-ui
ExternalLinksSettings:BackgroundJobsUiUrlhttps://localhost:7074/hangfire

Attachments, Notes and feature flags ​

The same keys are used by all four API hosts. Environment-variable equivalents use double underscores, for example FeatureManagement__Attachments and Attachments__MinIO__Bucket.

API keyCompose .env keyMeaning
FeatureManagement:AttachmentsFEATURE_ATTACHMENTSEnable attachment operations; defaults to false
FeatureManagement:NotesFEATURE_NOTESEnable notes independently of storage; defaults to false
Attachments:UploadExpirationEnabledATTACHMENTS_UPLOAD_EXPIRATION_ENABLEDKeep pending upload expiration active when Attachments is disabled; defaults to false
Attachments:MinIO:InternalEndpointMINIO_INTERNAL_ENDPOINTS3 endpoint reached by the API for verification and server-side copy
Attachments:MinIO:PublicEndpointMINIO_PUBLIC_ENDPOINTBrowser-reachable S3 endpoint used to sign upload/download URLs
Attachments:MinIO:BucketMINIO_BUCKETPrivate attachment bucket for this vertical
Attachments:MinIO:AccessKeyMINIO_APP_ACCESS_KEYApplication storage account, separate from the MinIO root account
Attachments:MinIO:SecretKeyMINIO_APP_SECRET_KEYApplication storage secret
Attachments:MinIO:AllowInsecureHttpMINIO_ALLOW_INSECURE_HTTPLocal-development HTTP opt-in; defaults to false

The checked-in local .env files explicitly enable both features and upload expiration. MinIO credentials are injected through Compose; they are not stored in API appsettings.Development.json. An IDE launch needs equivalent environment variables or .NET User Secrets because ASP.NET Core does not read Compose .env files automatically.

Feature state is fixed at API startup. After changing .env, recreate the API container with docker compose ... up -d; restarting an existing container does not replace its environment. Reload the browser after updating all replicas. Administrator permissions do not override a disabled feature.

Upload expiration runs inside the API host, not Hangfire. It changes database metadata and writes AuditLog events; it never deletes MinIO objects. MinIO configuration is required only when the Attachments feature is enabled, although the provided full Compose stacks still start storage.

See Feature Flags for rollout and registration, and Attachments & Notes configuration for all limits, lifetimes, storage requirements and production configuration.

Reporting ​

NGB.Api/DependencyInjection.cs binds the report request budget and cursor protection settings:

KeyDefaultMeaning
Reporting:Requests:ConcurrentPages12Concurrent interactive report requests per API instance
Reporting:Requests:ConcurrentDownloads2Concurrent report downloads per API instance
Reporting:Requests:QueuedDownloads4Maximum pending downloads per instance; 0 disables waiting
Reporting:Requests:DownloadQueueTimeoutSeconds3Maximum FIFO queue wait before report preparation; must be positive
Reporting:Requests:PageTimeoutSeconds30Interactive request deadline
Reporting:Requests:DownloadTimeoutSeconds300Download execution deadline after admission
Reporting:Cursor:SigningKeyEphemeral process keyBase64 of at least 32 random bytes; share across replicas and restarts to preserve cursor validity

Environment-variable equivalents use double underscores, for example Reporting__Requests__ConcurrentDownloads and Reporting__Cursor__SigningKey. A full download queue or expired queue wait returns HTTP 429 with Retry-After: 3. Queued downloads do not start report preparation or open report read sessions. Page admission remains immediate. Align the combined queue wait and execution deadline with proxy and client timeouts. See Report Browsing and Direct Downloads.

Background Jobs host ​

The PM background-jobs host has both application infrastructure settings and scheduler settings.

KeyMeaning
ConnectionStrings:DefaultConnectionApplication database connection
KeycloakSettings:IssuerAuthentication issuer for the host
KeycloakSettings:ClientIds[]Allowed background-jobs client ids
BackgroundJobs:EnabledMaster scheduler enable switch
BackgroundJobs:DefaultTimeZoneIdDefault time zone for job evaluation
BackgroundJobs:NightlyCronShared nightly maintenance schedule
BackgroundJobs:Jobs.<job-id>.CronPer-job cron expression
BackgroundJobs:Jobs.<job-id>.EnabledPer-job enable switch
BackgroundJobs:Jobs.<job-id>.TimeZoneIdPer-job time zone override

PM development job schedules ​

Job idCronEnabledTime zone
accounting.operations.stuck_monitor*/5 * * * *trueUTC
accounting.general_journal_entry.auto_reverse.post_due*/15 * * * *trueUTC
pm.rent_charge.generate_monthly0 5 * * *trueUTC

Watchdog host ​

The PM Watchdog host is configured as a small health aggregation surface.

KeyMeaning
WebClientBrowser-facing web URL used by Watchdog
KeycloakSettings:IssuerAuthentication issuer
KeycloakSettings:ClientIds[]Allowed watchdog client ids
HealthChecksUI:HealthChecks[].NameDisplay name of a monitored target
HealthChecksUI:HealthChecks[].UriHealth endpoint URI for a monitored target

PM development targets ​

NameURI
Watchdoghttps://ngb.pm.watchdog/health
APIhttps://ngb.pm.api/health
Background Jobshttps://ngb.pm.backgroundjobs/health

Web client (Vite) ​

The verified Property Management web app .env exposes the following runtime keys:

KeyMeaningExample
VITE_API_BASE_URLAPI base URL for the SPAhttps://localhost:7071
VITE_KEYCLOAK_URLKeycloak server URLhttp://pm-keycloak.localhost:7012
VITE_KEYCLOAK_REALMKeycloak realm namengb-demo
VITE_KEYCLOAK_CLIENT_IDWeb client idngb-pm-web-client
VITE_BACKGROUND_JOB_URLBackground-jobs dashboard URLhttps://localhost:7074/hangfire
VITE_WATCHDOG_URLWatchdog UI URLhttps://localhost:7075/health-ui

The Compose-based PM web service also injects:

  • VITE_KEYCLOAK_ROLE_ADMIN
  • VITE_KEYCLOAK_REDIRECT_URL
  • VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URL

Migrator CLI ​

The shared migrator runner supports both command-line flags and environment-variable fallbacks.

InputMeaning
--connection "<connStr>"Primary application connection string
NGB_CONNECTION_STRINGEnvironment-variable fallback for --connection
`--schema-lock-mode waittry
NGB_SCHEMA_LOCK_MODEEnvironment-variable fallback for lock mode
--schema-lock-wait-seconds <N>Explicit schema lock wait
NGB_SCHEMA_LOCK_WAIT_SECONDSEnvironment-variable fallback for lock wait
--application-name <name>Explicit migrator application name
NGB_APPLICATION_NAMEEnvironment-variable fallback for application name
--k8sEnables Kubernetes-oriented defaults
NGB_K8S_MODE=trueEnvironment-variable fallback for Kubernetes mode

Practical rules ​

  • Keep application settings in structured host sections such as ConnectionStrings, KeycloakSettings, ExternalLinksSettings, and BackgroundJobs.
  • Keep local ports, image versions, and bootstrap credentials in vertical .env files consumed by Docker Compose.
  • Prefer environment-variable injection for secrets and deployment overrides instead of editing checked-in appsettings*.json.
  • Keep UI runtime settings under explicit VITE_* keys rather than duplicating host config sections in the SPA.

Released under the Apache License 2.0.