forked from Lumen-Scribe/Lumenqraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
106 lines (91 loc) · 4.56 KB
/
Copy pathrender.yaml
File metadata and controls
106 lines (91 loc) · 4.56 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
# Render Blueprint — card-free deployment of Lumenqraph.
#
# Pairs with a free Supabase Postgres (Render's own free Postgres is DELETED 30
# days after creation, so it can't host a standing demo). Full walkthrough,
# including the keep-alive ping this tier requires: docs/DEPLOYMENT.md.
#
# Why one service instead of the three in fly.toml: Render's free plan covers
# web services only — there is no free background-worker type — and the free
# allowance is 750 instance-hours/month, which covers exactly one always-on
# service (a month is ~730h). So the indexer rides along inside the web service
# via scripts/run-all-in-one.sh. Fly/compose still run them separately.
#
# Deploy: push to GitHub, then Render Dashboard -> New -> Blueprint -> pick this
# repo. You'll be prompted for the `sync: false` values below.
services:
- name: lumenqraph
type: web
runtime: docker
plan: free
# Keep this near the Supabase project's region: every indexer query crosses
# this gap. The demo DB lives in eu-west-1 (Ireland) -> frankfurt.
region: frankfurt
dockerfilePath: ./Dockerfile
dockerContext: .
# Overrides the image's default CMD (api only) to run indexer + api together.
dockerCommand: run-all-in-one.sh
healthCheckPath: /health
envVars:
# Supabase session-pooler URI, from Supabase -> Project Settings ->
# Database -> Connection string. Must include ?sslmode=require.
- key: DATABASE_URL
sync: false
# Comma-separated contract allowlist. MUST stay set on this tier, and MUST
# NOT include the CAS3J7GY… SAC: it emits ~550 events/ledger (~9.5M/day),
# which fills Supabase's 500MB free cap within hours. See DEPLOYMENT.md.
- key: CONTRACT_IDS
sync: false
- key: RPC_URL
value: https://mainnet.sorobanrpc.com
- key: RUST_LOG
value: info
- key: EXPLORER_DIR
value: /app/explorer
# Keep only a rolling window of history, so the index converges to a steady
# disk footprint instead of growing until writes fail at the 500MB cap.
# ~2 days at ~5s/ledger. Raise toward 120960 (~7 days, the limit of what
# public RPC serves anyway) only after watching actual Supabase disk use —
# running out of disk breaks the demo, a shorter window merely shortens it.
- key: RETENTION_LEDGERS
value: "34560"
# Public RPC rejects getEvents more than a few thousand ledgers behind the
# tip (-32001), so a cursor that falls behind can't catch up. Keep this
# small: gaps are skipped and logged rather than stalling the tail.
- key: MAX_CATCHUP_LEDGERS
value: "120"
- key: STATE_INDEXING
value: "true"
- key: KEY_INDEXING
value: "true"
# ---- Security --------------------------------------------------------
# Encryption key used to sign and verify webhook payloads (HMAC-SHA256).
# Generate before deploying: openssl rand -hex 32
# Leave the value blank here — Render will prompt you to set it as a
# secret. Never commit a real value to source control.
- key: WEBHOOK_ENCRYPTION_KEY
sync: false
# ---- Database connection pool ----------------------------------------
# Supabase free tier allows 60 simultaneous connections. The all-in-one
# container runs indexer + api in the same process group, so their pools
# share that cap. These defaults leave headroom for migrations and the
# Supabase internal pooler.
# indexer — single writer, low concurrency → 3 connections
# api — concurrent reads → 8 connections
# Raise these values only after monitoring actual Supabase connection use.
- key: DATABASE_MAX_CONNECTIONS
value: "10"
# ---- Optional second network in the same container --------------------
# Setting TESTNET_DATABASE_URL makes run-all-in-one.sh start a second
# indexer+api pair against Soroban testnet, reverse-proxied by the public
# API under /testnet (one origin, both networks — the explorer's network
# selector discovers it automatically via /health "mounts"). Use a second
# *database* in the same Supabase project (CREATE DATABASE …_testnet):
# both share the project's 500MB, so keep the testnet CONTRACT_IDS
# curated and the retention window short.
- key: TESTNET_DATABASE_URL
sync: false
- key: TESTNET_CONTRACT_IDS
sync: false
# ~1 day. Testnet is a scratch network; a short window is plenty.
- key: TESTNET_RETENTION_LEDGERS
value: "17280"