Skip to content

Deployment ​

ProcessCenter does not depend on a specific deployment platform. It runs as a single Node process that serves both the API and the built SPA, so any host that can run a Node process or a container works: managed cloud, Kubernetes, a plain VM, or on-premises hardware.

Build and run ​

text
pnpm install --frozen-lockfile
pnpm run build
pnpm start
  • pnpm run build writes the SPA to dist/public and the server bundle to dist/index.js.
  • pnpm start runs NODE_ENV=production node dist/index.js and listens on PORT (default 3000).
  • Dockerfile (multi-stage) and docker-compose.onprem.yml cover container and on-premises installs.

Environment variables ​

Inject the same variables on every host and keep secrets in the host secret store only.

  • DATABASE_URL: required.
  • DATABASE_DIALECT: postgresql (recommended) or mysql.
  • DEPLOYMENT_PROFILE: CLOUD (default) or ON_PREM. Set it explicitly; the application never auto-detects a hosting provider.
  • PORT: listen port; defaults to 3000.
  • APP_ORIGIN: canonical public origin used to build auth callbacks.
  • CORS_ORIGINS: comma-separated allowlist, needed only when the API and the SPA are served from different sites.
  • PORTAL_JWT_SECRET: session cookie signing secret.
  • PORTAL_CONSOLE_ORIGIN, PORTAL_CONSOLE_API_KEY, PORTAL_CONSOLE_PORTAL_ID: set only for PortalConsole central management. Without them the portal starts in standalone mode with the sync scheduler disabled.
  • PORTAL_CONSOLE_SYNC_INTERVAL_MS: synchronization interval; defaults to one hour.
  • NPM_TOKEN: only when installing the private package registry dependency.

Runtime topology ​

  • Terminate TLS and route /api in the hosting reverse proxy; the application binds its own PORT only.
  • Session cookies are Secure; keep the public origin on HTTPS.
  • Register one PortalConsole callback: <public origin>/auth/callback.
  • Run database migrations as a separate release step (pnpm db:postgres:migrate:node for PostgreSQL, drizzle-kit migrate for MySQL) before the new revision receives traffic.