-
Notifications
You must be signed in to change notification settings - Fork 125
Expand file tree
/
Copy pathrender.yaml
More file actions
103 lines (98 loc) · 4.5 KB
/
Copy pathrender.yaml
File metadata and controls
103 lines (98 loc) · 4.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
services:
- type: web
name: agentic-trading-api
env: python
region: oregon
plan: standard
# Build and run from repository root (dashboard lives under dashboard/).
# Prod deploys via Dockerfile (ATL on 3.13, AI Hedge Fund venv on 3.12 via
# uv). This native buildCommand is documentation — upstream numpy^1.24 has
# no cp313 wheels, so the isolated venv must use 3.12.
buildCommand: pip install -r requirements.txt && pip install uv && uv python install 3.12 && uv venv --python 3.12 .ai-hedge-fund-venv && uv pip install --python .ai-hedge-fund-venv -r requirements-ai-hedge-fund.txt
# Start command (canonical ASGI package target; runs via Render's shell,
# which expands $PORT). No import-path workarounds needed.
startCommand: uvicorn dashboard.backend.app:app --host 0.0.0.0 --port $PORT
# Port
envVars:
- key: PORT
value: 8000
- key: PYTHONUNBUFFERED
value: true
- key: PYTHON_VERSION
value: 3.13.5
# Trusts Render's edge router as the X-Forwarded-For source, so
# uvicorn's own proxy handling agrees with rate_limit.client_ip()'s
# left-most-entry read instead of returning the router's own IP for
# every visitor. Granularity fix, not a trust boundary -- the header is
# still caller-suppliable -- see rate_limit.py's module docstring.
- key: FORWARDED_ALLOW_IPS
value: "*"
- key: AI_HEDGE_FUND_PYTHON
value: .ai-hedge-fund-venv/bin/python
- key: OPENROUTER_API_KEY
sync: false
# Encrypts both broker OAuth tokens and per-agent hosted-runtime
# credentials. Retains the established name for ciphertext compatibility.
- key: BROKER_TOKEN_ENCRYPTION_KEY
sync: false
- key: DATABASE_PATH
value: /data/backtest.db
# Durable Postgres for user-created content (agents, versions,
# strategies). Accounts are separate: USERS_DATABASE_URL. Set in the
# Render dashboard BEFORE merging the feature -- this yaml is
# documentation, not the mechanism (prod does not sync from it; see
# CLAUDE.md "Prod deploy reality").
- key: CONTENT_DATABASE_URL
sync: false
# Durable Postgres for user accounts + sessions (users, auth_sessions).
# Content is separate: CONTENT_DATABASE_URL. Documentation only, same as
# above -- set in the Render dashboard, not synced from this yaml. A fully
# durable deploy sets BOTH, pointed at the same Neon DB.
- key: USERS_DATABASE_URL
sync: false
# HMAC key for auth_sessions.token_hash. REQUIRED here: the app refuses to
# start without it whenever RENDER is set, because a session digest keyed
# on a development fallback is not a protection. Set it in the Render
# dashboard BEFORE merging anything that depends on it -- env-var writes do
# not themselves redeploy, so setting it after the merge leaves one deploy
# cycle failing its boot. Rotating this value invalidates every live
# session; users sign in again.
- key: SESSION_HASH_SECRET
sync: false
# Monthly HMAC key for non-reversible Analytics network grouping.
# Missing/invalid values omit network_hash; Analytics never stores plaintext IP.
- key: ANALYTICS_PSEUDONYMIZATION_KEY
sync: false
# Optional session lifetimes; both default in session_tokens.py.
# SESSION_TTL_DAYS (7) is the absolute cap, SESSION_IDLE_HOURS (24) the
# idle window.
- key: SESSION_TTL_DAYS
sync: false
- key: SESSION_IDLE_HOURS
sync: false
# Durable Postgres for backtest run history (agent_runs, equity_timeseries,
# trades, backtest_decisions, run_manifest). Accounts and content are
# separate: USERS_DATABASE_URL / CONTENT_DATABASE_URL. Set in the Render
# dashboard BEFORE merging -- this yaml is documentation, not the mechanism
# (prod does not sync from it; see CLAUDE.md "Prod deploy reality").
- key: AGENT_RUNS_DATABASE_URL
sync: false
- key: DISCORD_BOT_API_SECRET
sync: false
- key: DISCORD_CLIENT_ID
sync: false
- key: DISCORD_CLIENT_SECRET
sync: false
- key: DISCORD_REDIRECT_URI
sync: false
- key: DISCORD_GUILD_CHANNEL_URL
sync: false
- key: PUBLIC_APP_URL
sync: false
# Health check
healthCheckPath: /health
# File storage for SQLite database (persistent)
disks:
- name: database
mountPath: /data
sizeGB: 1