Skip to content

Deployment

Create a production compose file:

docker-compose.prod.yml
services:
frontend:
build:
context: ./frontend
target: production
ports:
- "80:80"
api:
build:
context: ./backend
target: production
environment:
- ENV=production
timescaledb:
volumes:
- postgres_data:/var/lib/postgresql/data
Terminal window
docker compose -f docker-compose.prod.yml up -d
Terminal window
# Production .env
DB_PASSWORD=strong_random_password
JWT_SECRET=another_strong_random_secret
POLYGON_API_KEY=your_production_key
  • Strong database password
  • JWT secret rotated
  • API keys secured
  • HTTPS enabled
  • Rate limiting configured

For the marketing site and documentation:

  1. Connect your GitHub repository
  2. Configure build settings:
    • Build command: npm run build
    • Output directory: dist
  3. Deploy

Set in Cloudflare dashboard:

  • PUBLIC_API_URL - Your API endpoint
backup.sh
pg_dump -h localhost -U postgres quantum_trader > backup_$(date +%Y%m%d).sql
Terminal window
0 2 * * * /path/to/backup.sh
Terminal window
# API health
curl http://localhost:8501/health
# Database health
docker compose exec timescaledb pg_isready
Terminal window
# All services
docker compose logs -f
# Specific service
docker compose logs -f api