Skip to content

Operations

Health monitoring

Endpoint Auth Use
GET /health/live none The backend process is up (Docker HEALTHCHECK, liveness probes)
GET /health/ready none 200 when the database, storage and templates are usable, and the LLM if FORGE_READY_CHECK_LLM=true; 503 with checks naming the failure
GET https://<site>/healthz none The web UI process on IIS

The UI's app bar and System status page show the backend readiness to users.

Logs

The backend writes one JSON object per line to stdout (FORGE_LOG_FORMAT=json). Each line carries ts, level, logger, message, and when relevant request_id, session_id and run_id. Responses return the request id in X-Request-ID.

docker compose logs -f --since 30m forge-api
docker compose logs forge-api | grep '"run_id": "<id>"'

Logs rotate at 5 × 20 MB (docker-compose.yml). Ship them with your usual Docker log collector. On IIS, the UI logs through the standard ASP.NET Core providers (Event Log); ANCM stdout logs are for short diagnosis only.

Backup and restore

The database and the files must be backed up together. Stop the API for a consistent copy:

docker compose stop forge-api
docker run --rm -v middleware-forge-data:/data -v "$PWD":/backup busybox \
  tar czf /backup/forge-data-$(date +%F).tgz -C /data .
docker compose start forge-api

To restore, stop the API and extract into the volume (or the host folder) with tar xzf. Ownership stays 10001.

Retention

Finished runs and idle sessions older than FORGE_RETENTION_DAYS (default 30) are deleted hourly, with their artifacts, uploads and checkpoints; 0 keeps everything. Lower the value if the disk fills up. See Workflows → Retention.

Upgrades and rollback

  1. Back up the volume.
  2. Update the source and rebuild:

    git pull
    docker compose up -d --build --wait
    

    Migrations run at startup. Runs in progress are marked interrupted and can be resumed from the UI. 3. Publish and deploy the web UI from the same commit (Web UI on IIS). 4. Run the smoke test.

To roll back, run the previous image tag (FORGE_IMAGE_TAG) and restore the backup from step 1; migrations are forward-only.

Rotating the API key

  1. Set the new FORGE_API_KEY in deploy/backend.env and run docker compose up -d.
  2. On the IIS server, replace the pool variable and recycle the pool:

    $appcmd = "$env:windir\system32\inetsrv\appcmd.exe"
    & $appcmd set config -section:system.applicationHost/applicationPools /-"[name='MiddlewareForge'].environmentVariables.[name='ForgeApi__ApiKey']" /commit:apphost
    & $appcmd set config -section:system.applicationHost/applicationPools /+"[name='MiddlewareForge'].environmentVariables.[name='ForgeApi__ApiKey',value='<new key>']" /commit:apphost
    & $appcmd recycle apppool /apppool.name:MiddlewareForge
    

Requests fail with 401 between the two steps, so do them together.

Smoke test

scripts/e2e_smoke.py drives the whole API flow and exits non-zero on the first failed check:

  • health and the API-key check;
  • create a session and upload tests/fixtures/user-profile.json;
  • wait for the plan, group the operations into three proxies, approve, wait for generation;
  • check the OSB files, the Word and Postman documentation, the ZIP and the event stream.
uv run python scripts/e2e_smoke.py --url http://10.0.0.15:8000 --api-key "$FORGE_API_KEY"

After a restart, run it with --check-history to confirm sessions, runs and artifacts survived. The test uses the real LLM and leaves one small session titled "e2e smoke" that you can delete in the UI.

Without an LLM (for example in CI), the compose overlay adds a deterministic stub LLM, on its own volume and port 18080:

C="docker compose -p forge-smoke -f docker-compose.yml -f deploy/smoke/docker-compose.smoke.yml"
$C up -d --build --wait
uv run python scripts/e2e_smoke.py --url http://127.0.0.1:18080 --api-key smoke-test-api-key-0123456789
$C down && $C up -d --wait
uv run python scripts/e2e_smoke.py --url http://127.0.0.1:18080 --api-key smoke-test-api-key-0123456789 --check-history
$C down -v

Capacity

  • Generation runs execute on a pool of 4 worker threads, and session turns on another 4; turns of one session run one at a time.
  • Most generation time is deterministic and takes seconds. LLM calls (planning, chat, and the rare XML fallback) dominate wall time, so the LLM server's throughput sets the real limit.
  • Each run writes its own folder; disk use is roughly the size of the generated project per run until retention removes it.