Deployment and operations
Use a stable release, Node.js 22+, and MySQL for production. Pin the target version and keep its configuration and upgrade records for future maintenance.
Minimal production path
Section titled “Minimal production path”cp .env.example .env# Set BAILING_ENV=production, a random BAILING_TOKEN, MySQL, and model configurationnpm cinpm run db:initnpm run admin:create -- adminnpm startThe public installer deploys the current stable distribution:
curl -fsSL https://www.bailinghub.com/install.sh | shOperations checklist
Section titled “Operations checklist”| Area | Requirement |
|---|---|
| Environment | Inject secrets from environment variables or a secret manager |
| Database | Run every pending migration; never edit an applied migration |
| Administrator | Bootstrap only an empty admin table; rotate initial credentials |
| Health | Use /health; use /version to verify application and contract versions |
| Audit retention | BAILING_AUDIT_RETENTION_DAYS=0 means no automatic deletion |
| Rate limits | Use the MySQL-backed ledger for consistent multi-instance semantics |
| Callbacks | Trace delivery failures and retain polling by job_id |
| Diagnostics | Export one redacted job trace, not a full database or live secrets |
Upgrade discipline
Section titled “Upgrade discipline”- Read the target release notes and compatibility guide;
- back up the database and deployment configuration;
- run pending migrations and verify the migration ledger;
- verify
/health,/version, console login, and a harmless task; - resume traffic and observe queues, errors, and tool calls.
When upgrading from v0.8.0 to v0.9.0, apply pending migrations 063 and 064 through npm run db:init. Earlier versions also need preceding migrations. The migrator uses the ledger to run unapplied files; service startup does not migrate automatically.
See the fixed v0.9.0 Operations guide and Compatibility guide.