-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
58 lines (56 loc) · 2.86 KB
/
Copy pathrender.yaml
File metadata and controls
58 lines (56 loc) · 2.86 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
# ── Render Blueprint (free tier — no persistent disk) ─────────────────────────
#
# Defines the BACKEND only. The frontend is actually deployed on Vercel
# (https://chain-forge-blockchain-by-shaurya.vercel.app), not Render — see
# frontend/vercel.json for its equivalent /api/* rewrite + SPA fallback rules.
# The commented-out service below is kept as a reference for anyone who'd
# rather host the frontend on Render instead; it's not part of the live setup.
#
# NO PERSISTENT DISK: Render's free tier doesn't support attaching one (disks
# require a paid plan, e.g. Starter at $7/mo + ~$0.25/GB/mo). Without it,
# blockchain_<NODE_ID>.db and wallet_<NODE_ID>.dat live in the container's
# ephemeral filesystem — they reset on every redeploy, and free services also
# spin down after ~15 min of inactivity and start fresh on the next request.
# Fine for a demo/portfolio deployment; not fine if you need the chain to
# accumulate real history over time. To upgrade later: bump `plan` to
# `starter` on the backend service, add a `disk:` block (mountPath e.g.
# /var/data), and set a GO_ROOT env var to that same path — goRunner.js,
# routes/blockchain.js, and routes/system.js all already check for it.
#
# IMPORTANT — things I could not verify from here (no Render account access):
# - Exact current Render Blueprint schema (field names occasionally change
# between Render API versions). Validate this in the Render dashboard's
# "New Blueprint" flow before relying on it — it will flag schema errors.
# - MONGO_URI must be set manually in the Render dashboard (sync: false
# means Render will prompt for it rather than reading it from this file,
# so the real Atlas credentials never need to be committed anywhere).
# ─────────────────────────────────────────────────────────────────────────────
services:
- type: web
name: chainforge-backend
runtime: docker
dockerfilePath: ./Dockerfile.render
dockerContext: .
plan: free
envVars:
- key: NODE_ID
value: "3000"
- key: MONGO_URI
sync: false
- key: ALLOWED_ORIGINS
value: https://chain-forge-blockchain-by-shaurya.vercel.app
# ── Not in use — frontend is hosted on Vercel instead (see top comment) ──────
# Reference only, for anyone who'd rather use a Render static site:
#
# - type: web
# name: chainforge-frontend
# runtime: static
# buildCommand: cd frontend && npm install && npm run build
# staticPublishPath: frontend/dist
# routes:
# - type: rewrite
# source: /api/*
# destination: https://chainforge-backend.onrender.com/api/*
# - type: rewrite
# source: /*
# destination: /index.html