# ═══════════════════════════════════════════════════════════════ # openvibe.coupons — environment configuration (names only; never commit values) # Copy to .env for development. Production: /etc/openvibe/coupons.env (0600). # ═══════════════════════════════════════════════════════════════ # Server PORT=4850 HOST=127.0.0.1 NODE_ENV=development # Public origin: canonical URLs, feeds, sitemaps and JSON-LD are built from it BASE_URL=http://localhost:4850 # Proxy hops that set X-Forwarded-For (Cloudflare → nginx → Node = 2). Per-IP rate limits use it. TRUST_PROXY=2 # PostgreSQL (ADR-035), written by OpenVibe.Host roles/data/add-service.sh coupons: the runtime role through PgBouncer, # the owner on a direct connection (boot migrations), and Valkey (shared limit counters). # Without DATABASE_URL, development uses an embedded PGlite database in data/pglite. # COUPONS_PGLITE_DIR (tests only) puts that embedded database in a directory of its own. DATABASE_URL= DATABASE_DIRECT_URL= VALKEY_URL= VALKEY_PREFIX= # OpenVibe.Network — SSO (OAuth2), JWKS, client-credentials tokens OV_NETWORK_URL=https://openvibe.network OV_NETWORK_INTERNAL_URL=http://127.0.0.1:4000 # OAuth client `coupons` (redirect https://openvibe.coupons/auth/callback). The same client is the # service principal svc:coupons for client-credentials grants (see README, "Grants"). OV_OAUTH_CLIENT_ID=coupons OV_OAUTH_CLIENT_SECRET= # Production: https://openvibe.coupons/auth/callback (default: BASE_URL + /auth/callback) #OV_OAUTH_REDIRECT_URI= # Cookies: Secure by default in production; set false for plain-http local development #COOKIE_SECURE=false # Signs the form tokens (CSRF). Unset: random per process. #COUPONS_FORM_SECRET= # Keys the reporter column (HMAC of the person). Set it in production; changing it restarts # same-day deduplication. Unset: a development key (and /api/ready says so). #COUPONS_REPORTER_KEY_SECRET= # Staff (review, moderation): staff with staff.editorial.manage (Network admins), plus these subjects # (usr_…, comma-separated; a product role, and the break-glass way in) #COUPONS_STAFF_SUBJECTS= # Browser helper: extension origins allowed by CORS on the two lookup routes only. # Exact origins (chrome-extension://) or the literal moz-extension://* (Firefox install origins # are random). Empty: no CORS; the helper still works through its host permission. #COUPONS_EXTENSION_ORIGINS= # Extension install tokens expire after this many days #COUPONS_INSTALL_TTL_DAYS=365 # Rate limits #COUPONS_LOOKUP_ANON_PER_MIN=30 #COUPONS_LOOKUP_TOKEN_PER_MIN=120 #COUPONS_LOOKUP_SERVICE_PER_MIN=600 #COUPONS_REPORTS_PER_HOUR=20 #COUPONS_REPORTS_PER_DAY=60 #COUPONS_SUBMISSIONS_PER_HOUR=10 #COUPONS_SUBMISSIONS_PER_DAY=30 #COUPONS_INSTALLS_PER_SUBJECT=10 # Per-actor limits (server/http/actor-limits.js): API reads one caller (a person, with every browser # helper they connected together, a service or app acting as itself, else an address) may make per # minute and per hour; past them 429 rate_limited with Retry-After. Writes have their own numbers (README). #COUPONS_LIMITS_MINUTE=120 #COUPONS_LIMITS_HOUR=3000 # OpenVibe.Sources — import the `coupons` category (runs when this and OV_OAUTH_CLIENT_SECRET are set) #OV_SOURCES_INTERNAL_URL=http://127.0.0.1:4720 # Only these source keys (comma-separated); empty: every coupons source. Others are held as not_selected. #COUPONS_SOURCES_KEYS=staff-coupon-codes #COUPONS_SOURCES_INTERVAL_MS=600000 # true: imported codes are listed without staff review (still status unknown) #COUPONS_SOURCES_AUTO_PUBLISH=false # OpenVibe.Events — the outbox relay runs only when EVENTS_URL and OV_OAUTH_CLIENT_SECRET are set #EVENTS_URL=http://127.0.0.1:4300 # Signs the /internal/events delivery (32+ characters); leave unset until the relay reads it #COUPONS_EVENTS_SECRET= #EVENTS_RELAY_INTERVAL_MS=2000 # Expiry / confidence-decay sweep (in-process); off: COUPONS_WORKER=off #COUPONS_WORKER=on #COUPONS_SWEEP_INTERVAL_MS=60000 # IndexNow: key file served at /.txt; a publish/update/removal pings api.indexnow.org. # Unset: off — no key file, no requests. Under a restore drill leave it unset/empty. #INDEXNOW_KEY= # release.json (openvibe-shared/release): the deployed commit when git is not available #RELEASE_COMMIT= #MIN_CLIENT_RELEASE=