Deployment overview¶
A production installation has two parts on an internal network:
| Part | Hosted on | Guide |
|---|---|---|
| Backend API (FastAPI, LangGraph, SQLite) | A Linux host with Docker | Backend on Docker |
| Web UI (Blazor Server) | Windows Server with IIS | Web UI on IIS |
Day-2 tasks (health, logs, backups, upgrades, retention, the smoke test) are in Operations.
Network architecture¶
%%{init: {"flowchart": {"nodeSpacing": 35, "rankSpacing": 70}}}%%
flowchart LR
subgraph users[User network]
browser([Browsers])
end
subgraph web[Web tier]
lb["Load balancer<br/>(optional)"]
iis1["IIS<br/>MiddlewareForge.Web"]
end
subgraph app[Application tier]
api["forge-api<br/>container"]
vol[("/data")]
end
subgraph ext[Internal services]
llm[(LLM server)]
ado[(Azure DevOps<br/>or GitHub)]
end
browser -->|443| lb --> iis1
iis1 -->|8000| api
api --- vol
api -->|HTTPS| llm
api -->|HTTPS| ado
The load balancer needs sticky sessions (Blazor Server keeps UI state per connection). The container runs as uid 10001 with a read-only root file system; the UI calls it over HTTP with X-Forge-Api-Key, and it reaches git and the pull-request APIs over HTTPS.
| Port | Where | Who connects |
|---|---|---|
| 443 | IIS | Users (HTTPS and WebSockets) |
| 8000 | Docker host, FORGE_BIND_ADDRESS:FORGE_PORT |
The IIS server(s) only |
| LLM port (for example 1234 or 8000) | LLM server | The backend |
| 443 | Azure DevOps Server / GitHub | The backend (git push, pull-request REST) |
Rules that keep the boundary:
- Browsers never call the backend. The Blazor server calls it and streams downloads itself;
FORGE_CORS_ORIGINSstays empty. - Publish port 8000 only to the IIS server(s): bind it to the internal address and add a host firewall rule.
- Every request except
/health*needsX-Forge-Api-Key, which equalsFORGE_API_KEY(required in production). - Outbound traffic from the backend goes to the LLM endpoint and the allow-listed git servers only.
Deployment strategies¶
| Strategy | When | How |
|---|---|---|
| Single developer machine | Development, demos | uv run python serve.py, or the mock backend plus dotnet run (Getting started) |
| One Docker host + one IIS server | The standard production setup | Both guides in this section |
| IIS web farm + one backend | Many concurrent users of the UI | Several IIS servers behind a load balancer with sticky sessions and shared Data Protection keys; all point at the same backend (web farm) |
| Air-gapped network | No internet access | Build the image where dependencies are reachable, push it to an internal registry, pin the base image by digest; use a local LLM and an internal CA bundle |
| CI smoke environment | Pipelines without an LLM | The compose overlay with a stub LLM (smoke test) |
Run exactly one backend container per data volume
The backend keeps run progress, event streams and job queues in its process and stores data in SQLite. Two containers sharing a volume, or a second replica behind a load balancer, are not supported. Scale the web tier, not the backend. See Known limitations.
Release checklist¶
- Back up the backend volume (Operations).
- Deploy the backend and the web UI from the same commit. The UI's API contract is tested against the backend of that commit.
- Check
/health/readyandhttps://<site>/healthz, and that the app bar shows Backend ready. - Run the smoke test.