Appearance
Deploy
This page describes migration from local runtime to production HA.
What this page covers
- The deployment shape from local development to HA production.
- The minimum configuration required before live traffic.
- A practical cutover and rollback sequence.
Deployment tiers
- Tier 0: standalone container for local/dev.
- Tier 1: single-host split (
db,api,worker). - Tier 2: HA target with managed Postgres and multi-replica API.
Production baseline
bash
AIONIS_MODE=service
APP_ENV=prod
MEMORY_AUTH_MODE=api_key
RATE_LIMIT_ENABLED=true
TENANT_QUOTA_ENABLED=true
RATE_LIMIT_BYPASS_LOOPBACK=false
TRUST_PROXY=true
CORS_ALLOW_ORIGINS=https://your-app.example.com
DATABASE_URL=postgres://<user>:<pass>@<managed-postgres-host>:5432/<db>Promotion checklist
- Externalize database and validate backup/restore drill.
- Run API and workers independently.
- Run at least two API replicas behind a load balancer.
- Enable auth, quota, rate-limit, and CORS controls.
- Run core gate before cutover.
Cutover steps
- Freeze schema-changing work in cutover window.
- Run migrations on target DB.
- Start workers, then API replicas.
- Verify health + smoke path.
- Shift traffic gradually while monitoring p95 and error rate.
Rollback minimum
- Shift traffic to last known-good release.
- Preserve failed release artifacts for audit.
- Re-run core health and consistency checks.
Post-deploy verification
Immediately after deployment:
- Run a fresh
writeandrecall_textrequest in the target environment. - Run one policy evaluation request with a real
run_id. - Confirm logs contain
request_id,decision_id, andcommit_uri. - Confirm dashboards show stable error rate and latency.
- Capture one replayable execution path before declaring success.