Rename the env var to make its scope unambiguous: it is a local dev override only and must never be set in production. Split the old single var into two with clearly documented purposes: - NEXT_PUBLIC_WWV_LOCAL_ENGINE_URL (local dev, .env.local, browser+server) Used by resolveEngineUrl.ts and engineManifest.ts to redirect WS connections to a locally-running engine during plugin development. Each worktree should use a different port to avoid collisions. - WWV_DATA_ENGINE_URL (production, docker-compose/Coolify, server-side only) Used by service.ts for MCP REST calls to the engine. NOT read by the browser. Set in docker-compose, not in .env.local. service.ts shim reads WWV_DATA_ENGINE_URL first so existing production docker-compose deployments are not broken by this rename. Also fixes stale dataengine.worldwideview.dev subdomain references in hostGlobals.ts (cloud fallback URLs now correctly point to dataenginev2).
130 lines
5.8 KiB
Bash
130 lines
5.8 KiB
Bash
# ============================================================
|
|
# .env — committed to git (non-secret defaults)
|
|
# ============================================================
|
|
# This file is tracked by git. Only put non-secret values here.
|
|
# Prisma reads DATABASE_URL from this file.
|
|
|
|
# Database (PostgreSQL)
|
|
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/worldwideview
|
|
|
|
# ============================================================
|
|
# .env.local — NOT committed (secrets & API keys)
|
|
# ============================================================
|
|
# Copy everything below into a new file called .env.local
|
|
# .env.local is gitignored and overrides .env values.
|
|
|
|
# Auth Secret (REQUIRED — generate with: openssl rand -hex 32)
|
|
# Must remain stable across restarts to preserve sessions and tokens.
|
|
# For Docker: also set this in the host environment or a .env file
|
|
# at the project root so docker-compose can inject it.
|
|
AUTH_SECRET=
|
|
|
|
# Encryption Master Key (REQUIRED — generate with: openssl rand -hex 16)
|
|
# Must be exactly 32 characters. Used to derive the AES-256-GCM key for credentials at rest.
|
|
# PRE-DEPLOY GATE: verify this is set in Coolify for every environment before merging C1 changes.
|
|
# If unset the server will refuse to start (enforced in src/instrumentation.ts).
|
|
ENCRYPTION_MASTER_KEY=
|
|
|
|
# Cesium Ion Access Token (optional — get one free at https://ion.cesium.com/)
|
|
NEXT_PUBLIC_CESIUM_ION_TOKEN=
|
|
|
|
# Bing Maps API Key (Optional, for high-res imagery)
|
|
# Get your key at https://www.bingmapsportal.com/
|
|
NEXT_PUBLIC_BING_MAPS_KEY=
|
|
|
|
# Supabase Configuration (Optional — cloud-only features)
|
|
# Found in your Supabase Project Settings > API
|
|
NEXT_PUBLIC_SUPABASE_URL=
|
|
# Preferred name for the Supabase anon/publishable key (matches worldwideview-marketplace).
|
|
# NEXT_PUBLIC_SUPABASE_ANON_KEY is still accepted as a backwards-compat alias.
|
|
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY=
|
|
SUPABASE_SERVICE_ROLE_KEY=
|
|
SUPABASE_DATABASE_URL=
|
|
|
|
# Cross-subdomain cookie domain (ADR-003).
|
|
# Local dev with hosts-file trick: .wwv.local
|
|
# Production: .worldwideview.dev
|
|
# Leave empty when running on plain localhost (cookies cannot share across ports).
|
|
NEXT_PUBLIC_WWV_COOKIE_DOMAIN=
|
|
|
|
# Auth host URL — the public URL of this WorldWideView instance when acting as auth host.
|
|
# Used to build emailRedirectTo in signup and OAuth flows.
|
|
# Local dev: http://wwv.local:3000
|
|
# Production: https://worldwideview.dev
|
|
NEXT_PUBLIC_AUTH_HOST_URL=
|
|
|
|
# OpenSky Network — multi-account credential rotation
|
|
# Comma-separated clientId:clientSecret pairs.
|
|
# Example: OPENSKY_CREDENTIALS=acct1-id:acct1-secret,acct2-id:acct2-secret
|
|
OPENSKY_CREDENTIALS=
|
|
|
|
# OpenWeatherMap — Weather radar tile overlays (free tier: 1,000 calls/day)
|
|
# Sign up at https://openweathermap.org/api and copy your API key.
|
|
OPENWEATHERMAP_API_KEY=
|
|
|
|
# ACLED API — Civil Unrest & Conflict data (free for non-commercial use)
|
|
# Register at https://developer.acleddata.com/ to obtain credentials.
|
|
# Data is updated weekly (Mondays) with global protest, riot, and violence events.
|
|
ACLED_EMAIL=
|
|
ACLED_PASSWORD=
|
|
|
|
# Marketplace Bridge Token — shared secret for marketplace → WWV install requests
|
|
# Generate any random string, then set the same value in the marketplace instance config.
|
|
WWV_BRIDGE_TOKEN=
|
|
|
|
# Marketplace URL — used by ticketClient.ts for token exchange (server-side only)
|
|
# Falls back to NEXT_PUBLIC_WWV_MARKETPLACE_URL then https://app.worldwideview.dev
|
|
MARKETPLACE_URL=
|
|
|
|
# Marketplace URL — used for PKCE connect/callback and client-side links
|
|
NEXT_PUBLIC_WWV_MARKETPLACE_URL=
|
|
|
|
# Plugin Ticket Auth — comma-separated plugin IDs that require WS first-message auth (ADR-001).
|
|
# Empty (default) = ticket auth dormant for all plugins. Set AFTER Marketplace + Data Engine deploy.
|
|
# Example: NEXT_PUBLIC_WWV_TICKET_AUTH_PLUGINS=aviation,maritime
|
|
NEXT_PUBLIC_WWV_TICKET_AUTH_PLUGINS=
|
|
|
|
# SSRF Proxy Host Allowlist (REQUIRED in production)
|
|
# "*" = permissive (logs WARN per request — use to observe traffic for one week, then tighten).
|
|
# "" = deny all (safe default when not set).
|
|
# Comma-separated list = only those hostnames allowed (e.g. "192.168.1.100,camera.example.com").
|
|
# Ship with "*" in Coolify; replace with concrete list after one week of log observation.
|
|
PROXY_HOST_ALLOWLIST=*
|
|
|
|
# Default plugins enabled on boot for demo edition
|
|
# Comma-separated list of plugin IDs
|
|
NEXT_PUBLIC_DEMO_DEFAULT_PLUGINS=
|
|
|
|
# Local Engine URL (local dev only — set in .env.local, NEVER in production)
|
|
# Points at your local data engine instance for per-plugin WS stream routing.
|
|
# Each worktree should use a different port so their engines don't collide.
|
|
# Local dev (engine on host): http://localhost:5000
|
|
NEXT_PUBLIC_WWV_LOCAL_ENGINE_URL=
|
|
|
|
# Data Engine REST URL (production / Docker Compose — server-side only)
|
|
# Used by MCP data tools and server-side entity queries to reach the engine REST API.
|
|
# NOT read by the browser. Set this in docker-compose or Coolify, not in .env.local.
|
|
# Docker Compose (same network): http://wwv-data-engine:5000
|
|
# External engine: http://<engine-host-ip>:5002
|
|
# WWV_DATA_ENGINE_URL=
|
|
|
|
# Edition: "local" | "cloud" | "demo"
|
|
NEXT_PUBLIC_WWV_EDITION=local
|
|
|
|
# Optional Database Teardown
|
|
# If set to true, terminating 'pnpm run dev' (Ctrl+C) will automatically
|
|
# stop the local database container (freeing up port 5432).
|
|
WWV_TEARDOWN_DB_ON_EXIT=false
|
|
|
|
# Demo Admin Secret (demo edition only)
|
|
# Allows operator plugin management on the demo instance via x-wwv-admin-secret header.
|
|
# Generate any random string. Only set this on the demo deployment.
|
|
# WWV_DEMO_ADMIN_SECRET=
|
|
|
|
# Shared cross-feature GSD planning docs (ROADMAP, MILESTONES, research).
|
|
# Each worktree has its OWN isolated .planning; this points at the shared root so
|
|
# GSD skills can read cross-feature docs without duplicating them per worktree.
|
|
# Set in each worktree's .env.local (path is machine-specific).
|
|
# WWV_SHARED_PLANNING=C:/dev/wwv/.planning
|