-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender-simple.yaml
More file actions
67 lines (62 loc) · 2.12 KB
/
Copy pathrender-simple.yaml
File metadata and controls
67 lines (62 loc) · 2.12 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
# Render Blueprint for StockPilot
# This file deploys all three services automatically
services:
# 1. Backend API
- type: web
name: stockpilot-backend
runtime: node
region: oregon
plan: free # Change to 'starter' for production ($7/mo)
buildCommand: cd backend && npm install && npx prisma generate
startCommand: cd backend && npm start
healthCheckPath: /api/health
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: 5000
- key: DATABASE_URL
sync: false # You'll add this manually
- key: JWT_SECRET
generateValue: true # Auto-generated secure secret
- key: ALLOWED_ORIGINS
value: "*" # Update this after deployment
- key: REDIS_ENABLED
value: false
# 2. Frontend App (Static Site)
- type: web
name: stockpilot-frontend
runtime: static
region: oregon
plan: free # Static sites are FREE forever!
buildCommand: cd frontend && npm install && npm run build
staticPublishPath: frontend/dist
envVars:
- key: VITE_API_URL
sync: false # Add your backend URL manually
routes:
- type: rewrite
source: /*
destination: /index.html
# 3. Landing Page
- type: web
name: stockpilot-landing
runtime: node
region: oregon
plan: free # Change to 'starter' for production ($7/mo)
buildCommand: cd stockLandingPage && npm install && npm run build
startCommand: cd stockLandingPage && npm start
envVars:
- key: NODE_ENV
value: production
- key: NEXT_PUBLIC_APP_URL
sync: false # Add your frontend URL manually
- key: NEXT_PUBLIC_API_URL
sync: false # Add your backend URL manually
# Note: After deployment, you need to:
# 1. Add DATABASE_URL to backend service
# 2. Add VITE_API_URL to frontend service (your backend URL)
# 3. Add NEXT_PUBLIC_APP_URL to landing service (your frontend URL)
# 4. Add NEXT_PUBLIC_API_URL to landing service (your backend URL)
# 5. Update ALLOWED_ORIGINS in backend to include frontend and landing URLs
# 6. Run migrations: In backend Shell, run "npx prisma migrate deploy"