Appearance
Manual local runbook
VerifiedTemplate
This runbook is the manual companion to docker-compose.pm.yml. Use it when you want to run parts of the stack locally from source instead of letting Docker Compose do everything.
Verified anchors
text
README.md
docker-compose.pm.yml
.env.pm
NGB.PropertyManagement.Api/Program.cs
NGB.PropertyManagement.BackgroundJobs/Program.cs
NGB.PropertyManagement.Watchdog/Program.cs
NGB.PropertyManagement.Migrator/Program.cs
docker/pm/migrator/seed-and-migrate.sh
ui/package.jsonRecommended boot order
- PostgreSQL
- Keycloak
- Migrator
- API host
- Background Jobs host
- Watchdog host
- Web client
That is the same logical order used by the compose environment.
1. Start PostgreSQL
You can either use the compose PostgreSQL service or run your own local PostgreSQL instance.
The application expects:
- one app database;
- one Keycloak database;
- proper app/database users;
- the application connection string to point to the app database.
2. Start Keycloak
The compose files and .env.pm show the local development convention:
- local hostname for Keycloak;
- one shared realm for the demo solution;
- separate clients for API, web, background jobs, watchdog, and tester.
If you are running Keycloak manually, mirror those values in your local realm and client setup.
3. Run the migrator
The verified seed-and-migrate.sh script shows the intended sequence:
bash
# migrate schema
dotnet run --project NGB.PropertyManagement.Migrator -- --connection "Host=...;Port=...;Database=...;Username=...;Password=..." --modules pm --repair
# seed defaults
dotnet run --project NGB.PropertyManagement.Migrator -- seed-defaults --connection "Host=...;Port=...;Database=...;Username=...;Password=..."
# optional demo seed
dotnet run --project NGB.PropertyManagement.Migrator -- seed-demo --connection "Host=...;Port=...;Database=...;Username=...;Password=..." --dataset demo --skip-if-dataset-exists true4. Run the API host
bash
ASPNETCORE_ENVIRONMENT=Development ConnectionStrings__DefaultConnection='Host=...;Port=...;Database=...;Username=...;Password=...' dotnet run --project NGB.PropertyManagement.Api5. Run the Background Jobs host
bash
ASPNETCORE_ENVIRONMENT=Development ConnectionStrings__DefaultConnection='Host=...;Port=...;Database=...;Username=...;Password=...' dotnet run --project NGB.PropertyManagement.BackgroundJobs6. Run the Watchdog host
bash
ASPNETCORE_ENVIRONMENT=Development dotnet run --project NGB.PropertyManagement.Watchdog7. Run the web workspace
From ui/:
bash
npm install
npm run dev:pm-webCertificates and HTTPS
The compose environment mounts ASP.NET development certificates from the user profile. If you run the hosts manually with HTTPS, make sure your local development certificate exists and is trusted.
Fast reset workflow
For a clean local reset:
- drop and recreate the app database;
- rerun migrator schema step;
- rerun
seed-defaults; - rerun
seed-demoif needed; - restart API, background jobs, and watchdog.