Skip to content
Nicolas Rico edited this page May 20, 2026 · 4 revisions

Deployment Guide — Sentinel

Sentinel is deployed on Render using two separate services: a Python backend (FastAPI) and a React static frontend. The database and authentication run on Supabase (already cloud-hosted).

Live URLs:


Architecture

Browser → Render Static Site (React/Vite)
               ↓ HTTPS API calls
          Render Web Service (FastAPI)
               ↓
          Supabase (DB + Auth + Realtime)
               ↓
          OpenAI gpt-4o-mini (AI agent)

The monitoring stack (Prometheus, Loki, cAdvisor, ChromaDB, LangFuse) is not deployed in the cloud. The system degrades gracefully — incidents can be created manually and the AI agent still runs full analysis via OpenAI and Supabase.


Prerequisites

  • A Render account connected to the GitHub repository
  • The repository: nicolas344/Sentinel-SoftServe
  • All environment variable values from Backend/.env

1. Deploy the Backend

Steps

  1. Go to render.com → New + → Web Service
  2. Connect the repository nicolas344/Sentinel-SoftServe
  3. Fill in the configuration:
Field Value
Name sentinel-backend
Language Python
Branch main
Root Directory Backend
Build Command pip install -r requirements.txt
Start Command uvicorn main:app --host 0.0.0.0 --port $PORT
Instance Type Free
  1. Add the following Environment Variables:
Key Description
SUPABASE_URL Supabase project URL
SUPABASE_SERVICE_KEY Supabase service role key (from project settings)
SUPABASE_JWT_SECRET JWT secret for validating tokens
OPENAI_API_KEY OpenAI API key for the AI agent
OPENAI_MODEL gpt-4o-mini
LOKI_URL http://localhost:3100 (graceful fail)
CHROMA_HOST http://localhost:8001 (graceful fail)
PROMETHEUS_URL http://localhost:9090 (graceful fail)
ALERTMANAGER_URL http://localhost:9093 (graceful fail)
LANGFUSE_HOST http://localhost:3001 (graceful fail)
LANGFUSE_PUBLIC_KEY LangFuse public key
LANGFUSE_SECRET_KEY LangFuse secret key
  1. Click "Deploy Web Service"
  2. Wait ~3 minutes for the build to complete
  3. Verify the deployment:
curl https://sentinel-softserve.onrender.com/health
# Expected: {"status":"healthy"}

2. Deploy the Frontend

Steps

  1. Go to render.com → New + → Static Site
  2. Connect the same repository nicolas344/Sentinel-SoftServe
  3. Fill in the configuration:
Field Value
Name sentinel-frontend
Branch main
Root Directory Frontend
Build Command npm install && npm run build
Publish Directory dist
  1. Add the following Environment Variables:
Key Value
VITE_SUPABASE_URL Supabase project URL
VITE_SUPABASE_ANON_KEY Supabase anon key (public, safe to expose)
VITE_API_URL https://sentinel-softserve.onrender.com
  1. Click "Deploy Static Site"
  2. Wait ~2 minutes for the build to complete

Note: The repository includes a Frontend/public/_redirects file with the rule /* /index.html 200. This is required for React Router to work correctly on Render — without it, any route other than / returns a blank page.


3. Verify End-to-End

Once both services are live:

  1. Open https://sentinel-softserve-1.onrender.com
  2. Log in with your Supabase credentials
  3. Verify the Dashboard loads and incidents are visible
  4. Go to Sistema → Integraciones — Supabase should appear as connected; the other services will show as unreachable (expected in cloud deployment)
  5. Create a manual incident and verify the AI agent processes it end-to-end

CORS Configuration

The backend is configured to accept requests from any *.onrender.com or *.vercel.app domain via regex:

allow_origin_regex=r"(^http://(\d{1,3}\.){3}\d{1,3}:5173$|^https://.*\.onrender\.com$|^https://.*\.vercel\.app$)"

If you deploy the frontend to a custom domain, add it to allow_origins in Backend/main.py.


Automatic Redeploys

Render automatically redeploys both services on every push to the connected branch. No manual action is required after merging to main.


Cost

Service Plan Monthly Cost
Backend (FastAPI) Free $0
Frontend (Static Site) Free $0
Supabase Free tier $0
Total $0/month

Free tier backend instances spin down after 15 minutes of inactivity. The first request after inactivity takes ~30 seconds (cold start). This is expected behavior on the free plan.


Deployment configured for Sentinel v2 — Sprint 3 · Client: SoftServe

Clone this wiki locally