Deployment
Last updated 2026-10-07
General checklist for any host:
npm ci && npm run build(or build in Docker).- Set
NODE_ENV=production.rhea startdoes this for you. - Provide every variable from
src/config/env.ts. Startup aborts with a list if any is missing or invalid. - Set
CORS_ORIGINto explicit origins. - Behind a load balancer or reverse proxy, set
trustProxy(see Security). - Route the platform's stop signal (SIGTERM) to the Node process. Avoid wrappers that swallow signals. Running
node dist/server.jsdirectly is safest. - Use
/healthfor liveness checks. - Collect stdout: production logs are JSON, one object per line.
- Run
rhea doctorandrhea securityin CI.
Graceful shutdown waits for in-flight requests up to shutdownTimeoutMs (10 s by default), then closes remaining connections. Make sure your platform's termination grace period is longer.
Rhea.js is alpha. Evaluate carefully before running it in production.