-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrender.yaml
More file actions
77 lines (77 loc) · 3.93 KB
/
Copy pathrender.yaml
File metadata and controls
77 lines (77 loc) · 3.93 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
# render.yaml — Render Blueprint for the dash-flows documentation site
# (flows.2plot.dev). Deploys run.py (the markdown-driven docs app) as a
# Docker web service. Blueprint spec: https://render.com/docs/blueprint-spec
#
# ---------------------------------------------------------------------------
# BLUEPRINT vs LIVE SERVICE — read this before trusting envVars below.
# Render applies Blueprint `envVars` on Blueprint SYNC only, never on ordinary
# git-push autodeploys. The live service predates this file's current shape,
# so every `sync: false` var — and NETWORK_BULLETIN_URL / APP_BASE_URL if the
# service hasn't been re-synced — must be set directly on the SERVICE in the
# Render dashboard. This bit email.2plot.dev: NETWORK_BULLETIN_URL sat in its
# render.yaml for weeks while the running service never saw it.
# ---------------------------------------------------------------------------
#
# Local equivalent (no Render needed):
# docker build -t dash-flows-docs .
# docker run --rm -p 8560:8560 -e PORT=8560 dash-flows-docs
# open http://localhost:8560
services:
- type: web
# NOTE: renaming here does NOT rename an already-provisioned service —
# the live service keeps whatever name it was created with. This value
# matters for fresh Blueprint syncs only.
name: dash-flows
runtime: docker
dockerfilePath: ./Dockerfile
dockerContext: .
# Free tier is fine for a docs site, but it sleeps after ~15 min idle and
# cold-starts on the next request. Use "starter" (or higher) for always-on.
plan: free
# /healthz returns the network-standard {"ok": true, ...} body; it is
# excluded from traffic counts at write time (lib/analytics_tracker.py).
healthCheckPath: /healthz
autoDeploy: true
branch: main
envVars:
# Flask (WSGI) backend, served by gunicorn. Do NOT set fastapi/quart
# here: those are ASGI and would need uvicorn instead of gunicorn.
- key: DASH_BACKEND
value: flask
# gunicorn worker processes. 2 is a reasonable default; drop to 1 if the
# free tier's 512 MB feels tight. The Dockerfile also runs 4 threads per
# worker for callback concurrency.
- key: WEB_CONCURRENCY
value: "2"
# Canonical public origin — feeds every absolute URL the app emits
# (canonical tags, sitemap.xml, llms.txt links). APP_BASE_URL is the
# network-wide name; DASH_FLOWS_BASE_URL is this repo's original
# spelling and lib/constants.py honours both (APP_BASE_URL wins).
# The in-code default is already https://flows.2plot.dev, so these are
# belt-and-braces rather than load-bearing.
- key: APP_BASE_URL
value: https://flows.2plot.dev
# -----------------------------------------------------------------
# 2plot network wiring
# -----------------------------------------------------------------
# The shared HMAC secret every satellite holds — set it ON THE SERVICE
# in the Render dashboard (same value as on 2plot.ai), never in this
# file. Without it the app serves fine but reports no traffic.
- key: CROSS_APP_WEBHOOK_SECRET
sync: false
# This app's ONE short id on every hub surface (ads, traffic, bulletin):
# its 2plot network-directory key. Never the PyPI package name.
- key: SATELLITE_APP_ID
value: flows
- key: AD_APP_ID
value: flows
# The hub's announcement feed for the llms.txt viewer header. Opt-in:
# unset means the viewer renders on built-in tips. REMEMBER: must also
# be set on the live service directly (see the header note).
- key: NETWORK_BULLETIN_URL
value: https://2plot.dev/api/network/bulletin
# Minimum seconds between rollup POSTs (the contract asks for hourly).
# 1800 halves what a free-tier container eviction can swallow, and the
# reporter only POSTs when the day's numbers actually changed.
- key: SATELLITE_REPORT_INTERVAL_S
value: "1800"