Skip to main content

RMI Deployment ๐ŸŸข

Production deployment of rmi-backend (FastAPI + Uvicorn).

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:

ServicePortPurpose
rmi-backend8000FastAPI application (Uvicorn workers)
postgres5432Primary store (scans, wallets, users)
redis6379Cache + rate-limit counters + task queue
qdrant6333Vector 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 data
  • HELIUS_API_KEY โ€” Solana RPC + webhooks
  • ALCHEMY_API_KEY โ€” EVM RPC
  • BIRDEYE_API_KEY โ€” Solana token analytics

Upgrade procedureโ€‹

  1. git pull the tag you're deploying.
  2. docker compose pull && docker compose up -d --build (schema migrations run on boot via Alembic).
  3. Verify GET /healthz and re-run one known token scan to compare output shape.
  4. Keep the previous image tag for 48 h for rollback: docker compose up -d --build against the old tag.