Repository navigation
Expand file tree
/
Copy pathrender.yaml
More file actions
105 lines (103 loc) · 3.76 KB
/
Copy pathrender.yaml
File metadata and controls
105 lines (103 loc) · 3.76 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
# Render Blueprint — https://render.com/docs/blueprint-spec
#
# Two profiles:
# 1. xelma-backend-hackathon – demo server, no database required (npm run start:hackathon)
# 2. xelma-backend – production full backend with Prisma, Soroban, schedulers (npm start)
#
# Pick one when creating the Render service. The "Hackathon" profile is the
# simpler option for quick demos; the "Production" profile matches the full
# runtime described in the README.
#
# `npm start` (no args) runs the production entrypoint (dist/index.js) to
# match the "xelma-backend" Render service below. The hackathon demo has its
# own explicit script — `npm run start:hackathon` — so contributors and the
# hackathon Render service never accidentally boot the wrong server.
services:
# ── Hackathon Demo ──────────────────────────────────────────────────────
# Runs dist/server.js (src/server.ts → src/app.ts) with mock-data support.
# No PostgreSQL migrations required — DATA_MODE=mock uses in-process data.
- type: web
name: xelma-backend-hackathon
env: node
region: oregon
plan: free
nodeVersion: "22"
buildCommand: npm ci && npm run build
startCommand: npm run start:hackathon
healthCheckPath: /api/health
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: "3000"
- key: JWT_SECRET
sync: false
# No DATABASE_URL needed — DATA_MODE=mock uses in-process data
- key: DATA_MODE
value: mock
- key: ENABLE_MULTIPLAYER_SOCIAL
value: "true"
- key: CLIENT_URL
sync: false
- key: COINGECKO_API_URL
value: https://api.coingecko.com/api/v3/simple/price?ids=stellar&vs_currencies=usd
# Canonical Soroban names (aliases STELLAR_RPC_URL / CONTRACT_ID also accepted)
- key: SOROBAN_RPC_URL
value: https://soroban-testnet.stellar.org
- key: SOROBAN_CONTRACT_ID
sync: false
# ── Production (Full Backend) ───────────────────────────────────────────
# Runs dist/index.js (src/index.ts) – the complete application with
# Prisma ORM, Soroban contract integration, cron schedulers, price oracle,
# WebSocket broadcasting, and all API routes including admin/monitoring.
#
# Requires a PostgreSQL database. Migrations are applied automatically
# during the build phase.
- type: web
name: xelma-backend
env: node
region: oregon
plan: starter
nodeVersion: "22"
buildCommand: npm ci && npm run build && npx prisma generate && npx prisma migrate deploy
startCommand: npm start
healthCheckPath: /health
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: "3000"
- key: DATABASE_URL
sync: false
- key: JWT_SECRET
sync: false
- key: JWT_EXPIRY
value: 7d
- key: CLIENT_URL
sync: false
- key: XELMA_API_KEY
sync: false
- key: SOROBAN_NETWORK
value: testnet
- key: SOROBAN_RPC_URL
value: https://soroban-testnet.stellar.org
- key: SOROBAN_CONTRACT_ID
sync: false
- key: SOROBAN_ADMIN_SECRET
sync: false
- key: SOROBAN_ORACLE_SECRET
sync: false
- key: ROUND_SCHEDULER_ENABLED
value: "false"
- key: ROUND_SCHEDULER_MODE
value: UP_DOWN
- key: API_ONLY
value: "false"
- key: ORACLE_POLLING_INTERVAL_MS
value: "10000"
- key: ORACLE_REQUEST_TIMEOUT_MS
value: "5000"
- key: ORACLE_MAX_RETRIES
value: "3"
- key: ORACLE_STALENESS_THRESHOLD_MS
value: "60000"