Sigroom Docs

Deployment And Environments

Sigroom is service-oriented: web, API, gateway, and worker are independently buildable and deployable processes. Developer docs are a static Next export intended for Cloudflare hosting.

readyOperatorsSource reviewed 2026-11-24

Production Shape

text
app.<domain>      apps/web
api.<domain>      apps/api
gateway.<domain>  apps/gateway
worker            apps/worker
docs.<domain>     apps/docs static export

Optional Hosted Activity Reporting

  • To enable activity reporting on a dedicated non-enterprise hosted instance, configure HOSTED_ACTIVITY_TOKEN on Web and API. Eligible instances run in production with the mvp or production deployment profile.
  • For an initial signed Railway cutover, use the hosted activity preparation step in deployment/railway/README.md and the normal production owner approval. It sets the shared token on Web and API and enables HOSTED_DOCUMENT_ACTIVITY_ENABLED on the general Worker. The configuration rollback restores the three original absences. Complete image recovery for running services that received these settings.
  • The API writes JSONL parts under an opaque per-user and per-session prefix in its private bucket. Schema v3 includes user and workspace IDs, filenames, selected request bodies and hosted model prompts and responses, including code within those exchanges. The activity collector does not ingest repositories. Existing SQL session records resolve bucket prefixes through scripts/ops/hosted-activity-session-prefixes.sql.
  • When an owner selects a private goal for a turn, the recorded prompt can include the goal title, next action and milestone. The reply is recorded in the same assistant session. After rollout, run verify-public-release.mjs with --require-hosted-activity to check the published Privacy Policy and Terms and read back a synthetic session from its bucket folder.
  • Configure expiration on the hosted-activity/ bucket prefix. Keep bucket keys and SQL ownership metadata out of dataset exports. Monitor sigroom_hosted_activity_dropped_total for records lost during buffering or shutdown.

Deployment Rules

  • Each runtime application service owns build/start, health/readiness and typed environment validation. The static docs export has no runtime health endpoint or secret configuration.
  • Railway deployment must not rely on one shared production .env file.
  • Before changing the production database, capture a backup with the PostgreSQL 18 server and its matching pg_dump client. Keep the receipt that verifies the saved file against the remote checksum, then restore it on an isolated database with the candidate API. If the four-minute SSH capture expires, inspect its private diagnostics and retry in a fresh output directory.
  • Docker build contexts exclude .local and .sigroom directories, package-scanner work directories, and dotenv files at every depth. Each build profile lists the public environment templates it includes. Supply private values when the service starts.
  • To verify Railway readiness, use the project and environment IDs from the release inputs. If railway status --json lists several environments, run railway status --environment <environment-id> --json and verify that it returns only the intended environment. The release check then compares the API and Web versions with the candidate source, images and migration head.
  • When running the API release migration, keep the JSON result for the candidate. A first run reports passed. A retry reports already_passed after verifying the migration ledger. If the command exits silently, check the entry point before promotion.
  • To rebuild the artifact scanner, run build-artifact-scanner-candidate.mjs on the isolated Linux builder after building the Worker. The operator checks the new ruleset and exercises the scanner over HTTPS using the Worker adapter. Keep its exported image and receipt for independent vulnerability scanning and issuer verification before publication.
  • If the scanner build cannot find a pinned Ubuntu package, check the signed Noble indexes for the target architecture. The operator records the installed versions in actual-package-versions.json.
  • Browser-facing values stay public; service-to-service transport follows the approved private-network and mTLS profile.
  • Playwright’s JSON report records browser launch options. Keep environment values out of those options when extending the browser matrix. The macOS WebKit wrapper inherits its pinned browser path from the runner.
  • Docs deploy as static files and do not require runtime secrets.
  • apps/docs uses Next output export, trailing slashes, and unoptimized images so Cloudflare can serve the generated out/ directory as static assets.

Source Material

  • docs/deployment/README.md
  • docs/deployment/architecture/service-boundaries.md
  • docs/14-observability-reliability-and-ops.md
  • ops/railway/env-matrix.md
  • apps/api/src/hosted-activity.ts
  • scripts/ops/hosted-activity-session-prefixes.sql
  • apps/docs/next.config.mjs
  • docker/package-security-scanner/README.md
  • deployment/railway/qualification/build-artifact-scanner-candidate.mjs
  • playwright.config.ts