Deployment
Live URLs
| Service | URL |
|---|---|
| Main site | veda-guru.com |
| Chat | veda-guru.com/chat |
| Gurukula Learn | veda-guru.com/learn |
| Maharshi Voice | veda-guru.com/maharshi |
| API | https://veda-guru-api-552772273342.us-central1.run.app |
| Documentation | docs.veda-guru.com |
Backend API (GCP Cloud Run)
Repo: github.com/veda-guru-ai/veda-guru-ai-api
Deployed via Cloud Run (fully managed) with a Dockerfile:
| Setting | Value |
|---|---|
| Runtime | Python 3.12 (containerized) |
| Region | us-central1 |
| Port | 8080 |
| Min instances | 0 (scale to zero) |
| Max instances | 2 |
| Memory | 512Mi |
| CPU | 1 vCPU |
| Concurrency | 80 |
| Ingress | All |
| Authentication | Allow unauthenticated |
Required environment variables:
| Variable | Value |
|---|---|
SARVAM_API_KEY |
(your Sarvam AI API token) |
SARVAM_API_URL |
https://api.sarvam.ai/v1/chat/completions |
FRONTEND_URL |
https://veda-guru.com |
Optional environment variables:
| Variable | Purpose |
|---|---|
TAVILY_API_KEY |
Primary web search (free tier: 1000 searches/mo) |
JWT_SECRET |
Auth token signing key (auto-generated if unset) |
DATABASE_URL |
Neon/Supabase Postgres connection string (for persistent data) |
ADMIN_EMAIL |
Email address to grant admin role |
Database persistence
By default, the app uses SQLite (veda_guru.db) which is ephemeral — data is lost on restart. For persistent storage, set DATABASE_URL to a Neon Postgres connection string:
postgresql://user:password@ep-xxx.region.aws.neon.tech/dbname?sslmode=require
Neon free tier: 500MB storage, no credit card required. See neon.tech.
Deploying to Cloud Run
# Build and push to Artifact Registry (or use Cloud Build)
gcloud builds submit --tag gcr.io/PROJECT_ID/veda-guru-api
# Deploy to Cloud Run
gcloud run deploy veda-guru-api \
--image gcr.io/PROJECT_ID/veda-guru-api \
--region us-central1 \
--memory 512Mi \
--cpu 1 \
--min-instances 0 \
--max-instances 2 \
--concurrency 80 \
--allow-unauthenticated \
--set-env-vars="FRONTEND_URL=https://veda-guru.com,SARVAM_API_URL=https://api.sarvam.ai/v1/chat/completions" \
--set-secrets="SARVAM_API_KEY=sarvam-api-key:latest,TAVILY_API_KEY=tavily-api-key:latest,JWT_SECRET=jwt-secret:latest,DATABASE_URL=database-url:latest"
Frontend UI (Cloudflare Pages)
Repo: github.com/veda-guru-ai/veda-guru-ai-ui
Domain: veda-guru.com (bought from Namecheap, DNS managed by Cloudflare)
Deploy setup
- Connect repo to Cloudflare Pages
- Build settings:
- Build command: (none — static files)
- Build output directory:
/(or the repo root)
- Add custom domains in Cloudflare Pages dashboard → project → Custom domains:
veda-guru.com(main site)admin.veda-guru.com(admin panel subdomain)
Routing
_redirects — friendly URL rewrites (status 200 means internal rewrite, not a redirect):
/chat /samvada.html 200
/learn /learning.html 200
/article /wisdom.html 200
/maharshi /rishivani.html 200
/admin /admin-panel.html 200
functions/_middleware.js — a Cloudflare Pages Function that routes admin.veda-guru.com → admin-panel.html. Static assets (CSS, JS, images) pass through normally.
Pages
| URL | File |
|—–|——|
| / | index.html — landing page |
| /chat | samvada.html — main Q&A (Samvāda) |
| /learn | learning.html — Gurukula learning paths |
| /article | wisdom.html — daily wisdom articles |
| /maharshi | rishivani.html — Maharshi voice chat |
| /admin | admin-panel.html — admin dashboard |
| admin.veda-guru.com | → admin-panel.html (via Pages Function) |
Update
API_URLinscript.js,maharshi.js, and all HTML files if the backend URL changes.
Documentation (Cloudflare Pages)
Repo: github.com/veda-guru-ai/veda-guru-ai-docs
- Connect repo to Cloudflare Pages
- Build settings:
- Build command:
bundle exec jekyll build - Build output directory:
_site
- Build command:
- Set custom domain:
docs.veda-guru.com - Pushes to
mainauto-deploy the docs site
Redeploying after changes
All three services auto-deploy when you push to the main branch of their respective repos. No manual steps needed.
Cold start
Cloud Run scales to zero after ~5 minutes of inactivity. The first request after idle triggers a cold start (10-30s). The frontend handles this with a connection status card and retry loop.