forked from superdesigndev/treg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
410 lines (407 loc) · 15.5 KB
/
Copy pathrender.yaml
File metadata and controls
410 lines (407 loc) · 15.5 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
# Render Blueprint — deploys treg as one web service (API + dashboard + landing + tutorial +
# /llms.txt + /install.sh) backed by a managed Postgres. See docs/context/ops/deploy.md.
#
# The app is a single FastAPI service: `python -m treg` honors $PORT (Render routes + health-checks
# it). Web assets ship in the wheel via pyproject `force-include src/treg/web`, so `pip install .[server]`
# bundles everything — no separate frontend build. The `[server]` extra pulls the FastAPI/DB/crypto stack
# (the base install is the CLI only — see pyproject).
#
# Secrets (Fernet key, OAuth, Resend, admin/session tokens) are NOT in this file — they are set once
# in the Render dashboard (sync:false below marks them as dashboard-managed). The Postgres URL is
# auto-wired via fromDatabase; config.py rewrites postgres:// → postgresql+asyncpg:// at load.
databases:
- name: treg-db
databaseName: treg
region: oregon
plan: basic-256mb # smallest paid tier with persistence; bump later if needed
services:
- type: web
name: treg
runtime: python
region: oregon
plan: starter
branch: main
buildCommand: pip install ".[server]"
preDeployCommand: python -m treg upgrade
startCommand: python -m treg
healthCheckPath: /meta
autoDeploy: true
envVars:
# Postgres — auto-injected from the managed DB above (config.py adds the asyncpg driver).
- key: TREG_DATABASE_URL
fromDatabase:
name: treg-db
property: connectionString
# Public base URL — drives the OAuth callback, /meta, /llms.txt, /install.sh, all {BASE} links.
# CUTOVER (treg.superdesign.dev → treg.to, 2026-08): setting this back to
# https://treg.superdesign.dev is the complete, lossless rollback — PUBLIC_HOST_ALIASES
# keeps both names valid in both directions, and the old domain must stay attached on
# Render forever (installed clients hold tokens against it).
- key: TREG_PUBLIC_URL
value: https://treg.to
# Never return OTP codes in prod responses (account-takeover vector); email them via Resend.
- key: TREG_EMAIL_DEV_MODE
value: "false"
# One rollout switch for OAuth permissions awaiting provider review. Remove a key after its
# review succeeds; set an empty value after all listed reviews succeed.
- key: TREG_OAUTH_REVIEW_PENDING
value: instagram-login,page-messages
# treg.to is Resend-verified (DKIM + SPF). Deliverability canary after every change to this
# value: sign in via email OTP and confirm the code ARRIVES — send failures are swallowed by
# design, so a broken sender silently kills OTP login. Rollback: the old sender stays
# verified in Resend forever.
- key: TREG_EMAIL_FROM
value: tools-registry <no-reply@treg.to>
- key: PYTHON_VERSION
value: "3.12.7"
# Dashboard-managed secrets (paste values in Render; sync:false keeps them out of git).
- key: TREG_SECRET_KEY # Fernet key — MUST equal local .env verbatim (irreplaceable).
sync: false
- key: TREG_SESSION_SECRET
sync: false
- key: TREG_ADMIN_TOKEN
sync: false
- key: TREG_GITHUB_CLIENT_ID
sync: false
- key: TREG_GITHUB_CLIENT_SECRET
sync: false
- key: TREG_RESEND_API_KEY
sync: false
# Support chat (Intercom Messenger, treg's own workspace). Unset = widget off everywhere.
- key: TREG_INTERCOM_APP_ID # public workspace id (visible in page source anyway)
sync: false
- key: TREG_INTERCOM_SECRET # identity-verification secret — signs user_hash, never sent to the browser
sync: false
# Landing live-wire demo (optional — unset = sandbox calls all synthesize / webhook 404s).
- key: TREG_DEMO_STRIPE_KEY # Stripe sandbox restricted key (Charges only) for the live wire
sync: false
- key: TREG_DEMO_STRIPE_WEBHOOK_SECRET # whsec_… from the DEMO Stripe sandbox's webhook endpoint
sync: false
# Tier-4 platform keys: treg's OWN provider credentials, spent on a caller's behalf and metered
# against their prepaid balance (docs/PLATFORM-BALANCE-PLAN.md §Phase 3). A key alone does
# nothing — TREG_PLATFORM_PROVIDERS is the allow-list AND the kill switch: set it to "" to turn
# tier 4 off instantly, without a redeploy. Fund each provider account upstream first.
- key: TREG_PLATFORM_KEY_TIKHUB # TikHub API key (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_DATAFORSEO # base64 of "login:password" (HTTP Basic)
sync: false
- key: TREG_PLATFORM_KEY_SCRAPECREATORS # ScrapeCreators API key (x-api-key)
sync: false
- key: TREG_PLATFORM_KEY_BRIGHTDATA # Bright Data account API token (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_JUSTONEAPI
sync: false
- key: TREG_PLATFORM_KEY_SERPAPI
sync: false
- key: TREG_PLATFORM_KEY_MOZ # base64 of "access_id:secret_key" (HTTP Basic)
sync: false
- key: TREG_PLATFORM_KEY_SERANKING
sync: false
- key: TREG_PLATFORM_KEY_HUNTER
sync: false
- key: TREG_PLATFORM_KEY_LEADMAGIC
sync: false
- key: TREG_PLATFORM_KEY_LUSHA
sync: false
- key: TREG_PLATFORM_KEY_PDL
sync: false
- key: TREG_PLATFORM_KEY_DIFFBOT
sync: false
- key: TREG_PLATFORM_KEY_AKTA
sync: false
- key: TREG_PLATFORM_KEY_APIFY
sync: false
- key: TREG_PLATFORM_KEY_SERPSTAT # Serpstat API token (?token=…)
sync: false
- key: TREG_PLATFORM_KEY_SPYFU # SpyFu SECRET KEY alone (?api_key=…), not id/base64
sync: false
- key: TREG_PLATFORM_KEY_CORESIGNAL # Coresignal API key (`apikey` header)
sync: false
- key: TREG_PLATFORM_KEY_THECOMPANIESAPI # raw token, injected as "Basic {secret}" un-encoded
sync: false
- key: TREG_PLATFORM_KEY_COMPANYENRICH # CompanyEnrich API key (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_OCEANIO # Ocean.io API token (X-Api-Token); tier 4 refused until fx.yaml prices it
sync: false
- key: TREG_PLATFORM_KEY_PREDICTLEADS # base64 of "api_key:api_token" (HTTP Basic)
sync: false
- key: TREG_PLATFORM_KEY_FINDYMAIL # Findymail API key (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_BRANDDEV # Brand.dev API key (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_ICYPEAS # Icypeas API key (raw Authorization header)
sync: false
- key: TREG_PLATFORM_KEY_LEADSFORGE # LeadsForge API key (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_INFLUENCERSCLUB # influencers.club dashboard API key, a JWT (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_CRUSTDATA # Crustdata API key; x-api-version is injected from provider metadata
sync: false
- key: TREG_PLATFORM_KEY_AVIATO # Aviato API key (Authorization: Bearer)
sync: false
- key: TREG_PLATFORM_KEY_EXA # Exa API key (x-api-key); every response reports costDollars
sync: false
- key: TREG_PLATFORM_KEY_FIBER_AI # Fiber AI key (x-api-key)
sync: false
- key: TREG_PLATFORM_KEY_TOMBA # Tomba API key ta_… (X-Tomba-Key)
sync: false
- key: TREG_PLATFORM_KEY_TOMBA_SECRET # Tomba API secret ts_… (X-Tomba-Secret) — set BOTH
sync: false
- key: TREG_PLATFORM_KEY_MINIMAX # MiniMax Bearer key
sync: false
- key: TREG_PLATFORM_KEY_OPENROUTER # OpenRouter Bearer key
sync: false
- key: TREG_PLATFORM_KEY_REPLICATE # Replicate Bearer token
sync: false
- key: TREG_PLATFORM_PROVIDERS # e.g. "tikhub,dataforseo,scrapecreators"; "" = tier 4 off
value: ""
# Overflow (docs/context/ops/capacity.md): treg-owned aggregator accounts serving the SAME vendor
# endpoint when our own account is out. MODE is the switch: off (default) | shadow | on.
- key: TREG_OVERFLOW_MODE
value: "off"
- key: TREG_OVERFLOW_DAILY_BUDGET_USD
value: "20"
- key: TREG_OVERFLOW_KEY_ORTHOGONAL
sync: false
- key: TREG_OVERFLOW_KEY_MONID
sync: false
# Worker profile: the hourly capacity sweep (docs/context/ops/capacity.md). Same code, same env
# as the web service (fromService — add a platform key in the web service only), no HTTP.
- type: cron
name: treg-capacity-sweep
runtime: python
region: oregon
plan: starter
branch: main
schedule: "17 * * * *"
buildCommand: pip install ".[server]"
startCommand: treg-worker capacity sweep
envVars:
- key: TREG_DATABASE_URL
fromDatabase:
name: treg-db
property: connectionString
- key: PYTHON_VERSION
value: "3.12.7"
- key: TREG_SECRET_KEY
fromService:
type: web
name: treg
envVarName: TREG_SECRET_KEY
- key: TREG_OVERFLOW_KEY_ORTHOGONAL
fromService:
type: web
name: treg
envVarName: TREG_OVERFLOW_KEY_ORTHOGONAL
- key: TREG_OVERFLOW_KEY_MONID
fromService:
type: web
name: treg
envVarName: TREG_OVERFLOW_KEY_MONID
- key: TREG_PLATFORM_KEY_TIKHUB
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_TIKHUB
- key: TREG_PLATFORM_KEY_DATAFORSEO
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_DATAFORSEO
- key: TREG_PLATFORM_KEY_SCRAPECREATORS
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_SCRAPECREATORS
- key: TREG_PLATFORM_KEY_BRIGHTDATA
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_BRIGHTDATA
- key: TREG_PLATFORM_KEY_JUSTONEAPI
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_JUSTONEAPI
- key: TREG_PLATFORM_KEY_SERPAPI
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_SERPAPI
- key: TREG_PLATFORM_KEY_MOZ
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_MOZ
- key: TREG_PLATFORM_KEY_SERANKING
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_SERANKING
- key: TREG_PLATFORM_KEY_HUNTER
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_HUNTER
- key: TREG_PLATFORM_KEY_LEADMAGIC
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_LEADMAGIC
- key: TREG_PLATFORM_KEY_LUSHA
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_LUSHA
- key: TREG_PLATFORM_KEY_PDL
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_PDL
- key: TREG_PLATFORM_KEY_DIFFBOT
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_DIFFBOT
- key: TREG_PLATFORM_KEY_AKTA
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_AKTA
- key: TREG_PLATFORM_KEY_APIFY
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_APIFY
- key: TREG_PLATFORM_KEY_SERPSTAT
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_SERPSTAT
- key: TREG_PLATFORM_KEY_SPYFU
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_SPYFU
- key: TREG_PLATFORM_KEY_CORESIGNAL
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_CORESIGNAL
- key: TREG_PLATFORM_KEY_THECOMPANIESAPI
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_THECOMPANIESAPI
- key: TREG_PLATFORM_KEY_COMPANYENRICH
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_COMPANYENRICH
- key: TREG_PLATFORM_KEY_OCEANIO
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_OCEANIO
- key: TREG_PLATFORM_KEY_PREDICTLEADS
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_PREDICTLEADS
- key: TREG_PLATFORM_KEY_FINDYMAIL
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_FINDYMAIL
- key: TREG_PLATFORM_KEY_BRANDDEV
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_BRANDDEV
- key: TREG_PLATFORM_KEY_ICYPEAS
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_ICYPEAS
- key: TREG_PLATFORM_KEY_LEADSFORGE
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_LEADSFORGE
- key: TREG_PLATFORM_KEY_INFLUENCERSCLUB
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_INFLUENCERSCLUB
- key: TREG_PLATFORM_KEY_CRUSTDATA
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_CRUSTDATA
- key: TREG_PLATFORM_KEY_AVIATO
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_AVIATO
- key: TREG_PLATFORM_KEY_EXA
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_EXA
- key: TREG_PLATFORM_KEY_FIBER_AI
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_FIBER_AI
- key: TREG_PLATFORM_KEY_TOMBA
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_TOMBA
- key: TREG_PLATFORM_KEY_TOMBA_SECRET
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_TOMBA_SECRET
# Completes holds opened by asynchronous metered submissions. It never creates a hold.
- type: cron
name: treg-asynctasks-settle
runtime: python
region: oregon
plan: starter
branch: main
schedule: "*/2 * * * *"
buildCommand: pip install ".[server]"
startCommand: treg-worker asynctasks settle
envVars:
- key: TREG_DATABASE_URL
fromDatabase:
name: treg-db
property: connectionString
- key: PYTHON_VERSION
value: "3.12.7"
- key: TREG_SECRET_KEY
fromService:
type: web
name: treg
envVarName: TREG_SECRET_KEY
- key: TREG_PLATFORM_PROVIDERS
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_PROVIDERS
- key: TREG_PLATFORM_KEY_MINIMAX
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_MINIMAX
- key: TREG_PLATFORM_KEY_OPENROUTER
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_OPENROUTER
- key: TREG_PLATFORM_KEY_REPLICATE
fromService:
type: web
name: treg
envVarName: TREG_PLATFORM_KEY_REPLICATE