-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
154 lines (142 loc) · 8.09 KB
/
Copy path.env.example
File metadata and controls
154 lines (142 loc) · 8.09 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
# Copy to .env for local development. Everything here is OPTIONAL — with none
# of it set, `python run.py` serves the documentation site fully public, with
# ads, analytics and auth dormant. See DEPLOYMENT.md for the full reference.
# --- Core -------------------------------------------------------------------
DASH_BACKEND=flask
PORT=8050
HOST=127.0.0.1
DASH_DEBUG=true
# APP_BASE_URL is the network-standard name and is read FIRST;
# DASH_LEAFLET2_BASE_URL is this repo's own spelling and remains supported.
# An alias, never a rename — both are set on the live service, because
# dropping one of two env names from a running host is how it starts
# advertising the wrong canonical origin and deindexes itself quietly.
#
# THE TWO VALUES BELOW ARE LOCAL-ONLY. Do not copy this block into a hosted
# service's environment. They feed every canonical link, og:url, /sitemap.xml
# entry and /llms.txt URL, so a deployed host carrying them would publish a
# whole site of localhost addresses while looking perfectly healthy from the
# inside. `lib.constants.require_owned_base_url()` (the network's hard boot
# guard, adopted in the 1.3.x sync) REFUSES to boot a hosted deploy in that
# state — and also refuses when NEITHER variable is set, so production must
# declare its origin explicitly (render.yaml sets both to
# https://leaflet.2plot.dev). /healthz reports the origin actually being
# advertised either way.
# APP_BASE_URL=http://localhost:8050
DASH_LEAFLET2_BASE_URL=http://localhost:8050
# --- Optional: MUI X Pro ----------------------------------------------------
# Only the TreeViewPro tile browser on /tile-layers-pro uses this. Without it
# that one control renders watermarked; nothing else is affected.
# MUI_PRO_API_KEY=
# --- Optional: 2plot.dev ad network -----------------------------------------
# AD_SERVER_URL=https://2plot.dev
# AD_APP_ID=leaflet
# --- Optional: 2plot.ai satellite analytics ---------------------------------
# The tracker/reporter/rollup trio (lib/analytics_tracker.py,
# lib/satellite_reporter.py, lib/traffic_rollup.py). Without
# CROSS_APP_WEBHOOK_SECRET nothing is ever POSTed to the hub — the app says so
# at boot — while the local ledger still records visits and /healthz still
# serves. To exercise the payload without a secret:
# python -m lib.satellite_reporter --dry-run
# CROSS_APP_WEBHOOK_SECRET=
# `leaflet` is the hub's directory key — NOT the package name `dash-leaflet2`,
# which the hub only still accepts as a legacy id. (The Gen-1 spelling
# SATELLITE_APP_ID is retired; only SATELLITE_APP_KEY is read now.)
# SATELLITE_APP_KEY=leaflet
# Where the visit ledger lives. Local default is ./visitor_analytics.json
# (gitignored); production points it at the persistent disk — see render.yaml.
# TRAFFIC_ANALYTICS_FILE=/var/data/visitor_analytics.json
# SATELLITE_TRAFFIC_URL=https://2plot.ai/api/satellite/traffic
# SATELLITE_REPORT_INTERVAL_S=3600
# SATELLITE_REPORT_DELAY_S=90
#
# Live "active now" presence beacon (POST /api/satellite/active, URL derived
# from SATELLITE_TRAFFIC_URL). Display-only and ephemeral hub-side; the
# rollup above stays the source of the daily numbers. 0 disables; floor 30s.
# SATELLITE_PRESENCE_INTERVAL_S=60
# SATELLITE_PRESENCE_URL=https://2plot.ai/api/satellite/active
# Behind Cloudflare the country header is already present, so the ip-api.com
# fallback lookup is redundant latency; "0" disables it.
# ANALYTICS_GEO_LOOKUP=0
# --- Optional: 2plot.dev network bulletin -----------------------------------
# The hub's announcements + tips, rendered in this site's llms.txt viewer
# header. Unset means the feature is off and the viewer still renders — the
# tell for an unwired host is "No announcements." plus ONE generic tip where
# the hub publishes two.
#
# NOTE: the dash-improve-my-llms package never reads this variable. lib/bulletin
# does, and passes it to configure_bulletin(). Setting it in an app without that
# wiring does nothing, silently.
# NETWORK_BULLETIN_URL=https://2plot.dev/api/network/bulletin
# --- Optional: corpus document tiers -----------------------------------------
# Access tier for the tiered corpus documents served by dash-improve-my-llms
# >= 2.4.0: /llms-small.txt (compact briefing) and /llms-full.txt (every
# page's prose in one fetch). Values: public | auth | admin | hidden.
# Unset = public — the network's standing policy is that discovery documents
# stay free; these knobs exist so the 402 experiment can tighten the full
# corpus per-satellite without a redeploy of anything else. The hub's
# page-tier ceilings can also tighten either network-wide (a satellite can
# never loosen below the hub). Inert on older package versions.
# LLMS_SMALL_TIER=public
# LLMS_FULL_TIER=public
# --- Optional: Clerk auth (satellite of the 2plot.ai primary) ---------------
# Set ALL THREE to enable. Leave CLERK_IS_SATELLITE false locally — Clerk
# rejects satellite mode on localhost.
# CLERK_SECRET_KEY=sk_test_...
# CLERK_PUBLISHABLE_KEY=pk_test_...
# Production primary (2plot.ai on its custom Clerk domains):
# CLERK_SIGN_IN_URL=https://accounts.2plot.ai/sign-in
# CLERK_SIGN_UP_URL=https://accounts.2plot.ai/sign-up
#
# THE RETURN TRIP — required in production, and the one Clerk setting that
# fails with no error anywhere. Set, the Sign In button navigates to
# https://2plot.ai/onboarding?returnTo=<this page>, a page on the hub's own
# app that validates returnTo and sends the user home. Unset, sign-in falls
# back to the Clerk-hosted Account Portal, the hub's app never sees the
# request, and the user authenticates successfully and stays on 2plot.ai.
# A DESTINATION, not a flag. It must be an absolute http(s) URL — the value
# is concatenated as `<value>?returnTo=<here>`, so `true` or a bare host
# resolves against THIS site and the button 404s, which is worse than
# leaving it unset. dash-clerk-auth only logs a warning and uses a bad
# value anyway; lib/auth.py warns at boot for both mistakes.
# Leave it unset LOCALLY (localhost is not a satellite); render.yaml sets
# it in production.
# CLERK_SATELLITE_SIGN_IN_REDIRECT=https://2plot.ai/onboarding
# CLERK_FRONTEND_API=https://clerk.2plot.ai
# CLERK_IS_SATELLITE=false
# SESSION_SECRET=
# ADMIN_EMAILS=you@example.com
#
# Dev kill switch — reads as "intentionally off" without touching the keys.
# DISABLE_CLERK=1
# /admin/control-board fails CLOSED when Clerk is unavailable — it returns a
# 404 rather than an open admin panel, and the save callback refuses writes.
# Set this to work on the board locally without Clerk. NEVER set in production.
# ALLOW_UNGATED_ADMIN=1
# --- Optional: the interactive gate (lib/access.py) -------------------------
# Baseline tier for pages whose frontmatter declares none:
# public | auth | admin | hidden. `auth` puts a sign-in card in front of every
# documentation page; `/`, /llms-small.txt and /llms-full.txt stay public
# (pinned in run.py). PAGE_DEFAULT_VISIBILITY is the same knob under this
# site's older name and is still read — set one, not both.
#
# Locally this does nothing visible without the CLERK_* keys above: with Clerk
# unavailable every tier except `hidden` falls open, because documentation
# must not brick over a missing credential. To see the gate, set the Clerk
# keys, or read tests/test_access.py, which drives it with a fake session.
PAGE_DEFAULT_TIER=public
# PAGE_DEFAULT_VISIBILITY=public
# The SECOND axis: whether a gated page's MACHINE twin (/<page>/llms.txt, the
# crawler document, the prerender) stays open anyway. Unset = open, which is
# the current network posture — humans meet the sign-in card while agent and
# crawler demand keeps being measured. Setting it to 0 is the phase-4 agent
# flip and closes every page that did not pin `llms_public:` in frontmatter.
# LLMS_PUBLIC_DEFAULT=0
# Where the control board writes its overrides. An override beats both the
# frontmatter tier and PAGE_DEFAULT_TIER; only the hub's ceiling outranks it.
# In production this points at a persistent disk so toggles survive a deploy.
# PAGE_VISIBILITY_FILE=page_visibility.json
# Tiers for the two corpus documents, independent of PAGE_DEFAULT_TIER so
# gating the interactive site never silently gates the corpus.
# LLMS_SMALL_TIER=public
# LLMS_FULL_TIER=public