Repository navigation
Expand file tree
/
Copy pathrender.yaml
More file actions
68 lines (66 loc) · 2.63 KB
/
Copy pathrender.yaml
File metadata and controls
68 lines (66 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# =============================================================================
# TeraPlayer — Render Blueprint (Infrastructure as Code)
# =============================================================================
# Deploy the full stack on Render with one click.
# See https://render.com/docs/blueprint-spec for details.
#
# Services:
# 1. Backend — FastAPI web service (Python)
# (Frontend deploys on Vercel — see note in the disabled section below.)
#
# External dependencies:
# - MongoDB Atlas (free M0 tier): https://www.mongodb.com/atlas
# =============================================================================
services:
# --- Backend API -----------------------------------------------------------
- type: web
name: teraplayer-api
env: python
region: oregon # Change to us-east / frankfurt / singapore as needed
plan: free # Upgrade to starter ($7/mo) for better performance
buildCommand: pip install -r requirements.txt
startCommand: >
uvicorn server:app --host 0.0.0.0 --port $PORT
--workers ${WEB_CONCURRENCY:-1}
--limit-concurrency 100
--backlog 2048
--timeout-keep-alive 30
healthCheckPath: /api/health
autoDeploy: true
envVars:
- key: MONGO_URL
sync: false # Set manually: mongodb+srv://<user>:<pass>@<cluster>.mongodb.net
- key: DB_NAME
value: teraplayer
- key: CORS_ORIGINS
value: https://teraplayer.in,https://www.teraplayer.in # Production frontend origins only
- key: LOG_LEVEL
value: INFO
- key: RATE_LIMIT_MAX
value: "60"
- key: RATE_LIMIT_WINDOW
value: "60"
- key: WEB_CONCURRENCY
value: "1"
# Optional — set only if you have a TeraBox ndus cookie:
# - key: COOKIE_JSON
# sync: false
# Optional — set only if you have a Cloudflare Worker:
# - key: TERABOX_WORKER_URL
# sync: false
# --- Frontend --------------------------------------------------------------
# NOTE (2026-09-12): the public site is deployed on Vercel, NOT here —
# teraplayer.in resolves to Vercel infrastructure. The Render static-site
# service below is therefore disabled; re-enable only if you move the
# frontend back to Render. The backend API service above is unaffected.
# - type: web
# name: teraplayer-frontend
# env: static
# region: oregon
# buildCommand: yarn install && yarn build
# staticPublishPath: build
# pullRequestPreviewsEnabled: false
# autoDeploy: true
# envVars:
# - key: REACT_APP_BACKEND_URL
# value: https://teraplayer-api.onrender.com # Replace with your backend URL