Repository navigation
Expand file tree
/
Copy pathrender.yaml
More file actions
44 lines (44 loc) · 1.81 KB
/
Copy pathrender.yaml
File metadata and controls
44 lines (44 loc) · 1.81 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
# Render blueprint for the CollabIDE API + Yjs WebSocket server.
#
# The frontend is deployed separately (see client/vercel.json). Render runs the
# backend because it keeps WebSocket connections open, which the sync layer
# requires and pure-serverless hosts do not provide.
services:
- type: web
# Renamed so the blueprint creates a new service rather than trying to
# modify the existing one — a region cannot be changed in place.
name: collabide-api-sg
runtime: node
plan: free
# Every keystroke crosses this distance twice. Measured from India against
# the default Oregon region, a peer saw an edit after a median of 303ms —
# right where typing stops feeling live. Singapore is the nearest region
# Render offers to South Asia.
#
# Render fixes a service's region at creation, so changing this means
# creating a new service rather than editing an existing one.
region: singapore
rootDir: server
buildCommand: npm ci
startCommand: npm start
healthCheckPath: /api/health
envVars:
# The server runs TypeScript directly via Node's native type stripping,
# which is only unflagged from 23.6 onwards. An older Node here fails at
# startup, not at build time.
- key: NODE_VERSION
value: "24"
- key: NODE_ENV
value: production
# Generated once by Render and kept across deploys. Rotating either one
# invalidates every issued token, which is the intended behaviour.
- key: JWT_ACCESS_SECRET
generateValue: true
- key: JWT_REFRESH_SECRET
generateValue: true
# Set by hand in the dashboard: the Atlas connection string, and the
# frontend origin(s) allowed to call this API (comma-separated).
- key: MONGO_URI
sync: false
- key: CLIENT_ORIGIN
sync: false