-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
89 lines (85 loc) · 2.26 KB
/
Copy pathrender.yaml
File metadata and controls
89 lines (85 loc) · 2.26 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
# PostgreSQL Database
- type: pserv
name: hackto-postgres
plan: free # Change to 'standard' for production
region: oregon # Change to your preferred region
databaseName: neondb
user: neondb_owner
# postgresVersion: "15" (auto-selected)
# Redis Cache
- type: redis
name: hackto-redis
plan: free # Change to 'starter' or higher for production
region: oregon
ipAllowList: [] # Allow all IPs (restricted to internal only)
# Backend API
- type: web
name: hackto-backend
runtime: node
region: oregon
plan: free # Change to 'starter' for production
buildCommand: npm install && npm run build
startCommand: npm start
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: 3001
- key: DATABASE_URL
fromDatabase:
name: hackto-postgres
property: connectionString
- key: REDIS_URL
fromService:
name: hackto-redis
type: redis
property: connectionString
- key: JWT_SECRET
sync: false # Set manually in Render dashboard
- key: VITE_API_BASE_URL
value: ${RENDER_EXTERNAL_URL}
- key: CLOUDINARY_NAME
sync: false
- key: CLOUDINARY_API_KEY
sync: false
- key: CLOUDINARY_API_SECRET
sync: false
- key: JUDGE0_HOST
value: https://judge0-ce.p.rapidapi.com
- key: JUDGE0_API_KEY
sync: false
routes:
- path: /api
matchType: prefix
healthCheckPath: /health
healthCheckInterval: 30
disk:
name: hackto-backend-disk
sizeGB: 1
depends_on:
- hackto-postgres
- hackto-redis
# Frontend
- type: web
name: hackto-frontend
runtime: docker
region: oregon
plan: free # Change to 'starter' for production
dockerfile: frontend/Dockerfile
dockerfilePath: ./
envVars:
- key: VITE_API_BASE_URL
fromService:
name: hackto-backend
type: web
property: url
routes:
- path: /
matchType: prefix
healthCheckPath: /
healthCheckInterval: 30
depends_on:
- hackto-backend
# Nginx Reverse Proxy (Optional - if needed)
# For basic deployments, Render handles routing automatically