-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
135 lines (106 loc) · 3.73 KB
/
Copy pathrender.yaml
File metadata and controls
135 lines (106 loc) · 3.73 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# ⚠️ DEPRECATED - MIGRATED TO RAILWAY
# This file is kept for historical reference only.
#
# **Current Production Deployment**: Railway (https://mash-backend-api-production.up.railway.app)
# **Deployment Date**: October 22, 2025
# **Migration Reason**: Better performance, easier deployment, cost-effective
#
# For current deployment configuration, see:
# - railway.json
# - railway.toml
# - Dockerfile
#
# ---
# LEGACY CONFIGURATION BELOW (DO NOT USE)
# ---
# Render Blueprint for MASH Backend
# This file enables one-click deployment to Render.com
# Deploy: https://dashboard.render.com/select-repo?type=blueprint
# See docs/Render_Deployment.md for detailed deployment guide and troubleshooting.
# See deploy/.env.render.example for a complete environment variable template.
services:
# PostgreSQL Database
- type: pserv
name: mash-backend-db
plan: free # Change to 'starter' for production
region: oregon # Change to your preferred region: oregon, frankfurt, singapore, ohio
# NestJS Backend API
- type: web
name: mash-backend-api
runtime: docker
plan: free # Change to 'starter' for production ($7/month, no spin down)
region: oregon # Must match database region
branch: main # Change if deploying from different branch
dockerfilePath: ./Dockerfile
healthCheckPath: /api/v1/health
# Build command (optional - Docker handles this)
# buildCommand: npm run build
# Start command (optional - Docker ENTRYPOINT handles this)
# startCommand: npm run start:prod
envVars:
# Database (auto-populated from PostgreSQL service)
- key: DATABASE_URL
fromDatabase:
name: mash-backend-db
property: connectionString
# Node Environment
- key: NODE_ENV
value: production
- key: PORT
value: 3000
# JWT Configuration (CHANGE THESE IN RENDER DASHBOARD!)
- key: JWT_SECRET
generateValue: true # Render will generate a random value
- key: JWT_EXPIRATION
value: 7d
# CORS Configuration
- key: CORS_ORIGINS
value: "*" # Change to your frontend URLs (comma-separated) for production
# Rate Limiting
- key: THROTTLE_TTL
value: 60
- key: THROTTLE_LIMIT
value: 100
# File Upload
- key: MAX_FILE_SIZE
value: 10485760
- key: UPLOAD_PATH
value: ./uploads
# Logging
- key: LOG_LEVEL
value: info
# Clerk Authentication (REQUIRED - Add in Render Dashboard)
- key: CLERK_WEBHOOK_SECRET
sync: false # Get from https://dashboard.clerk.com
- key: CLERK_SECRET_KEY
sync: false # Get from https://dashboard.clerk.com
# MQTT (Optional - add if using IoT features)
- key: MQTT_BROKER_URL
value: ""
- key: MQTT_USERNAME
value: ""
- key: MQTT_PASSWORD
value: ""
# SendGrid Email (Optional)
- key: SENDGRID_API_KEY
sync: false # Set manually if needed
- key: FROM_EMAIL
value: "noreply@mash-backend.com"
# Redis (Optional - use Upstash free tier: https://upstash.com)
- key: REDIS_URL
sync: false # Add from Upstash dashboard if needed
# AWS S3 (Optional - for file storage)
- key: AWS_REGION
sync: false
- key: AWS_ACCESS_KEY_ID
sync: false
- key: AWS_SECRET_ACCESS_KEY
sync: false
- key: AWS_S3_BUCKET
sync: false
# Redis Cache (Optional - uncomment to enable)
# - type: redis
# name: mash-backend-redis
# plan: free
# region: oregon
# maxmemoryPolicy: allkeys-lru