Production Runbook
Use this runbook as a daily operational checklist.
Self-Hosted Deployment Model
TradeJS is distributed as public npm packages, not as a managed trading service. A production installation runs in an environment you operate and connects to Redis and PostgreSQL/Timescale services you control.
Build and start the installable app from your project:
npx tradejs-app build
npx tradejs-app start
Use your own process supervisor or container platform for the app and scheduled runtime commands. Provide TLS, ingress, backups, secrets management, and service monitoring according to your environment.
The public packages do not provision a turnkey production environment. Start with the local Quickstart, then replace local infrastructure with your production services deliberately.
Daily Health Checks
docker compose psor service manager status.npx @tradejs/cli doctor(or equivalent in runtime environment).- Verify API responsiveness and basic UI pages.
- Check Redis/Postgres connectivity and resource usage.
Incident Triage
- Identify failing layer: app, connectors, Redis, Postgres, ML, AI provider.
- Capture logs first (do not restart immediately unless severe).
- Confirm whether issue is global or symbol/strategy-specific.
- Apply scoped mitigation.
Restart Order (Typical)
- Data services (
timescale,redis) - ML inference service
- App service
- Reverse proxy / ingress if needed
Repository Research Automation
The research:auto and agent-run launchers are maintainer workflows for the
TradeJS source repository. They require repository-specific branches,
worktrees, checks, and push credentials, so they are not a supported external
npm deployment flow. Keep source-repository automation in the internal TradeJS
runbook rather than adding it to an application deployment based on the public
packages.
Rollback
- Keep previous image tags for
appandml-infer. - Roll back app and model aliases independently when required.
- Verify runtime with
doctorand smoke checks after rollback.