-
Notifications
You must be signed in to change notification settings - Fork 0
Development Setup
How to run Piro locally for development.
- .NET 10 SDK
- Node.js 20+ and pnpm (never npm or yarn)
- PostgreSQL (local install, or via Docker)
- (Optional) Docker & Docker Compose — for the database or full-stack mode
Piro has two separate frontend apps, not one:
| Component | Tech | Location | Port |
|---|---|---|---|
| API | ASP.NET Core 10 | src/Piro.Api/ |
5117 |
| Worker (optional) | ASP.NET Core 10 | src/Piro.Worker/ |
— |
| Public status page | Next.js 16 + React 19 | apps/web/ |
3000 |
| Admin panel | Vite + React (SPA) | apps/admin/ |
5173 |
The API runs checks in-process when PIRO_API_WORKER=true (the default in development). The standalone Worker is only needed for multi-region setups.
Piro requires PostgreSQL — there is no SQLite fallback. The easiest way to get one running locally:
docker run -d --name piro-postgres -e POSTGRES_PASSWORD=piro -e POSTGRES_DB=piro -p 5432:5432 postgres:16cd src/Piro.Api
ASPNETCORE_ENVIRONMENT=Development dotnet run
# http://localhost:5117appsettings.Development.json is loaded automatically. Migrations run on startup — no manual migration step needed.
cd apps/web
pnpm install
pnpm dev
# http://localhost:3000cd apps/admin
pnpm install
pnpm dev
# http://localhost:5173Open http://localhost:5173 — on first run you'll be redirected to the Setup Wizard to create the owner account and configure the instance (including a required, verified email configuration).
Runs the full stack (proxy, web, admin-served-as-static, API, PostgreSQL) with pre-built images.
docker compose up| Service | Port | Description |
|---|---|---|
| proxy (nginx) | :80 |
Reverse proxy in front of web/API |
| web | — | Next.js public status page |
| api | — | ASP.NET Core API |
| db | 5432 |
PostgreSQL |
Navigate to the proxy URL on first startup — you'll be routed into the setup wizard automatically.
- Open the admin panel — you're redirected into the Setup Wizard (General → Account → Email)
- Sign in with the owner account you just created
- Services → + Add service
- Open the service → + Add check (HTTP type, point at a real URL)
- Click Run now on the check row to trigger it immediately
- Open the public status page — the service's health should now show
- Incidents → + New incident (stays private until explicitly published)
- Maintenances → + Schedule maintenance
dotnet build Piro.slnx
dotnet testFor frontend type-checking, always use tsc -b (project references), not tsc --noEmit — this is what CI runs:
cd apps/web && pnpm exec tsc -b
cd apps/admin && pnpm exec tsc -b| Variable | Default | Description |
|---|---|---|
Database__ConnectionString |
— | PostgreSQL connection string, required |
Auth__JwtSecret |
(auto-generated in dev) | JWT signing secret — set explicitly in production |
PIRO_API_WORKER |
true in development |
Whether the API runs checks in-process |
INTERNAL_API_URL |
http://localhost:5117 |
apps/web → API base URL (server-side) |
ASPNETCORE_ENVIRONMENT |
Development |
Set to Production for prod builds |
See Environment Variables for the full list used in Docker Compose deployments.
- Setup Wizard — first-run onboarding flow
- Environment Variables
- Self-Hosting