RMI Deployment ๐ข
Production deployment of rmi-backend (FastAPI + Uvicorn).
Docker (recommended)โ
git clone https://git.rugmunch.io/RugMunchMedia/rmi-backend.git
cd rmi-backend
cp .env.example .env # edit: DATABASE_URL, REDIS_URL, API keys for data providers
docker compose up -d --build
The compose stack starts:
| Service | Port | Purpose |
|---|---|---|
rmi-backend | 8000 | FastAPI application (Uvicorn workers) |
postgres | 5432 | Primary store (scans, wallets, users) |
redis | 6379 | Cache + rate-limit counters + task queue |
qdrant | 6333 | Vector KB (security patterns, RAG) |
Reverse proxyโ
server {
listen 443 ssl http2;
server_name api.example.com;
# ssl_certificate / ssl_certificate_key: Let's Encrypt
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
limit_req zone=api burst=20 nodelay;
}
}
Health checksโ
curl https://api.example.com/healthz # liveness
curl https://api.example.com/readyz # DB + Redis connectivity
Data provider keysโ
RMI enriches scans with free-tier data APIs (price, liquidity, holder analysis).
All are optional โ the scanner degrades gracefully without them, reporting which
checks were skipped. Add keys to .env as you go:
COINGECKO_API_KEY,DEXSCREENER_*โ market dataHELIUS_API_KEYโ Solana RPC + webhooksALCHEMY_API_KEYโ EVM RPCBIRDEYE_API_KEYโ Solana token analytics
Upgrade procedureโ
git pullthe tag you're deploying.docker compose pull && docker compose up -d --build(schema migrations run on boot via Alembic).- Verify
GET /healthzand re-run one known token scan to compare output shape. - Keep the previous image tag for 48 h for rollback:
docker compose up -d --buildagainst the old tag.