Documentation · Deployment
Deployment guide.
A practical baseline for running SUQIAN QUANT on infrastructure you control.
Prerequisites
- Linux host with Docker Engine and Docker Compose
- Domain name and TLS certificate (or reverse proxy with automatic TLS)
- PostgreSQL 16 and Redis 7 (bundled in the Compose baseline)
- Exchange API keys with trade-only permissions
Docker Compose baseline
# 1. Clone or unpack the licensed distribution
# 2. Create backend.env from the provided example
# 3. Set SECRET_KEY, DATABASE_URL, REDIS_URL
# 4. Start the stack
docker compose up -d
docker compose ps
Services
- backend — API and strategy engine
- trading-worker — pending orders and execution
- backend-http — HTTP entry service
- postgres — strategies, orders, positions, audit
- redis — cache, queues, locks
- nginx — TLS and reverse proxy
TLS and reverse proxy
Terminate TLS at Nginx or your load balancer. Never expose PostgreSQL or Redis publicly. Restrict the API to the expected origins and enable rate limiting.
Backup and recovery
pg_dump -U quantdinger quantdinger > backup.sql
# Test restore on a separate instance before relying on it
Upgrade checklist
- Read release notes and migration notes
- Back up the database and environment file
- Stop new trade starts or enter maintenance mode
- Deploy, run health checks, verify one paper strategy
- Resume live strategies only after validation
Health checks
Monitor /api/health, container health, worker logs, queue depth, database connectivity, and exchange WebSocket state. Alert on repeated reconnect failures and order dispatch errors.
