openvibers/openvibe.deals .env.example

.env.example

main 5.4 KB · 114 lines · plaintext

1# ═══════════════════════════════════════════════════════════════
2# openvibe.deals — environment configuration (names only; never commit values)
3# Copy to .env for development. Production: /etc/openvibe/deals.env (0600).
4# ═══════════════════════════════════════════════════════════════
5
6# Server
7PORT=4840
8HOST=127.0.0.1
9NODE_ENV=development
10# Public origin: canonical URLs, feeds, sitemaps and JSON-LD are built from it
11BASE_URL=http://localhost:4840
12# Proxy hops that set X-Forwarded-For (Cloudflare → nginx → Node = 2). The abuse controls read the client IP from it.
13TRUST_PROXY=2
14# Per-actor limits (server/http/actor-limits.js): API reads one caller (a person, a service or app
15# acting as itself, else an address) may make per minute and per hour; past them 429 rate_limited with
16# Retry-After. Writes have their own numbers, above the abuse controls below (README).
17#DEALS_LIMITS_MINUTE=120
18#DEALS_LIMITS_HOUR=3000
19# How long the sitemaps' and /llms-full.txt's offer and product lists are reused, in ms (production default 600000; 0
20# rebuilds on every read, the default elsewhere). Concurrent reads share one build either way.
21#DEALS_SITEMAP_TTL_MS=600000
22# How long the front page's build is reused, in ms (production default 60000; 0 rebuilds on every read, the default
23# elsewhere). Past the window one background rebuild runs and readers keep the last copy for up to three minutes.
24#DEALS_HOME_TTL_MS=60000
25# How long /hot's first page build is reused, in ms (production default 60000; 0 rebuilds on every read, the default
26# elsewhere). The worker rebuilds the front page and /hot before their windows close while it is enabled.
27#DEALS_HOT_TTL_MS=60000
28
29# PostgreSQL (ADR-035), written by OpenVibe.Host roles/data/add-service.sh deals: the runtime role through PgBouncer,
30# the owner on a direct connection (migrations), and Valkey (shared limit counters).
31# Without DATABASE_URL, development uses an embedded PGlite database in data/pglite.
32DATABASE_URL=
33DATABASE_DIRECT_URL=
34VALKEY_URL=
35VALKEY_PREFIX=
36
37# OpenVibe.Network — SSO (OAuth2), JWKS, client-credentials tokens
38OV_NETWORK_URL=https://openvibe.network
39OV_NETWORK_INTERNAL_URL=http://127.0.0.1:4000
40# OAuth client `deals` (redirect https://openvibe.deals/auth/callback). The same client is Deals'
41# service principal svc:deals for client-credentials grants (see README, "Grants").
42OV_OAUTH_CLIENT_ID=deals
43OV_OAUTH_CLIENT_SECRET=
44# Production: https://openvibe.deals/auth/callback (default: BASE_URL + /auth/callback)
45#OV_OAUTH_REDIRECT_URI=
46# Cookies: Secure by default in production; set false for plain-http local development
47#COOKIE_SECURE=false
48# Signs the no-JS form tokens (CSRF). Unset: random per process.
49#DEALS_FORM_SECRET=
50# Keys the HMAC that turns client IPs into ip hashes (vote limits, ring detection). Unset: random per
51# process, so hashes reset on restart (/api/ready reports abuse_keys as degraded).
52#DEALS_IP_HASH_SECRET=
53
54# Moderators besides staff with staff.content.moderate (Network global mods and admins): usr_… subjects,
55# comma-separated (a product role)
56#DEALS_MODERATORS=
57
58# Freshness: an observation older than this is shown as stale and the page is noindex
59#DEALS_FRESHNESS_HOURS=48
60
61# Abuse controls (defaults shown)
62#DEALS_VOTE_LIMIT_SUBJECT_HOUR=60
63#DEALS_VOTE_LIMIT_IP_HOUR=120
64#DEALS_VOTE_LIMIT_OFFER_HOUR=6
65#DEALS_SUBMIT_LIMIT_DAY=20
66#DEALS_OBSERVE_LIMIT_HOUR=30
67#DEALS_FLAG_LIMIT_DAY=30
68#DEALS_NEW_ACCOUNT_DAYS=7
69#DEALS_NEW_ACCOUNT_WEIGHT=0.25
70#DEALS_RING_IP_MIN=3
71#DEALS_RING_COVOTE_MIN=5
72#DEALS_RING_WINDOW_MIN=10
73#DEALS_WATCH_LIMIT=50
74
75# OpenVibe.Community — comment threads (referenced, never copied)
76# optional: defaults to https://openvibe.community
77# OV_COMMUNITY_URL=https://openvibe.community
78OV_COMMUNITY_INTERNAL_URL=http://127.0.0.1:4200
79
80# OpenVibe.Sources — deals-category items (needs sources.item.read). DEALS_IMPORT=off disables the importer.
81OV_SOURCES_INTERNAL_URL=http://127.0.0.1:4720
82#DEALS_IMPORT=on
83#DEALS_IMPORT_INTERVAL_MS=300000
84#DEALS_IMPORT_PAGE_SIZE=100
85#DEALS_IMPORT_MAX_PAGES=10
86#DEALS_IMPORT_REFRESH_BATCH=50
87
88# OpenVibe.Events — the outbox relay runs only when EVENTS_URL and OV_OAUTH_CLIENT_SECRET are set
89#EVENTS_URL=http://127.0.0.1:4300
90#EVENTS_RELAY_INTERVAL_MS=2000
91# Webhook secret(s) of Deals' sources.item.* subscription (comma-separated for rotation). Unset: /internal/events answers 503.
92#DEALS_EVENTS_SECRET=
93
94# Worker (stated expiry, hotness snapshots, freshness re-indexing, Sources pull); off: DEALS_WORKER=off
95#DEALS_WORKER=on
96#DEALS_WORKER_INTERVAL_MS=600000
97#DEALS_HOT_WINDOW_DAYS=14
98
99# Browser origins that may call /api/v1 with a Bearer Network JWT
100#API_CORS_ORIGINS=https://openvibe.network,https://openvibe.live,https://openvibe.community,https://openvibe.coupons
101
102# IndexNow (openvibe-shared/indexnow): 8–128 hex/alphanumeric characters. Set: the key file is served
103# at /<key>.txt and an indexable deal or product page appearing, changing or disappearing pings the
104# engines. Unset: off, nothing is mounted and nothing is sent.
105#INDEXNOW_KEY=
106
107# Data-source keys (D11 owner settings): the admin panel's deals.data_sources namespace wins; these
108# are the fallback when no value was entered there.
109#WOOT_API_KEY=
110
111# release.json (openvibe-shared/release): the deployed commit when git is not available
112#RELEASE_COMMIT=
113#MIN_CLIENT_RELEASE=
114