Deployment
Self-host the engine and optionally run this site as a Node service behind a reverse proxy.
Engine (Docker Compose)
yaml
services:
engine:
image: <engine-image>
ports:
- '18000:8000'
environment:
BOOTSTRAP_API_KEYS: 'dev-key-1,dev-key-2'Site (Node runtime)
bash
npm install
cp .env.example .env.local
# set MONAPI_ENGINE_API_KEY in .env.local
npm run build
npm run startEnvironment variables
dotenv
MONAPI_ENGINE_BASE_URL=http://localhost:18000
MONAPI_ENGINE_API_KEY=<server-secret>
DEMO_MODE=true
RATE_LIMIT_IP_DOMAIN_PER_MINUTE=15
RATE_LIMIT_EMAIL_PER_MINUTE=5Production notes
Put a reverse proxy in front (TLS, compression, rate limiting). Keep the engine API key server-only.
Common pitfalls
- Outbound SMTP (TCP/25) may be blocked; email deliverability can become unknown.
- In-memory rate limits are per instance; add proxy-level limits for multi-replica setups.
- Do not expose your engine API key in client-side code or public env vars.