GET /weather/alerts — api.weather.gov/alerts/active for settings.nws_area, sent with the NWS-required User-Agent, cached weather_alerts_ttl_s (90 s) with single-flight refresh. Zone-based alerts (geometry null) get their polygons from affectedZones (24 h zone cache, api.weather.gov/zones/ only); any still unresolved are returned in zone_only, never dropped. Failed refresh keeps last-good data + error + fetched_at; a payload where no feature parses is a schema-change error. Optional bbox filter. GET /weather/wind — nearest METAR (aviationweather.gov /api/data/metar, bbox query) within 75 km, cached 5 min per 0.5-degree cell; VRB wind and stale reports flagged; available:false with a reason otherwise. Both behind require_service_or_firebase_token like /traffic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
2.8 KiB
Bash
68 lines
2.8 KiB
Bash
# MQTT broker (usually the mosquitto container on this host)
|
|
MQTT_BROKER=mosquitto
|
|
MQTT_PORT=1883
|
|
# Use the c2-core credential — must match MQTT_C2_USER/MQTT_C2_PASS in the
|
|
# top-level .env
|
|
MQTT_USER=drb-c2-core
|
|
MQTT_PASS=change-me-c2
|
|
|
|
# Same value as the top-level .env's MOSQUITTO_DYNSEC_PASSWORD — lets
|
|
# c2-core log in as mosquitto's built-in dynsec "admin" client to
|
|
# administer node MQTT credentials. See app/internal/dynsec.py.
|
|
MQTT_DYNSEC_ADMIN_PASS=change-me-dynsec-admin-min-12-chars
|
|
|
|
# GCP — path to service account JSON inside the container
|
|
GCP_CREDENTIALS_PATH=/app/gcp-key.json
|
|
|
|
# Firestore database name (use "(default)" if you didn't create a named database)
|
|
FIRESTORE_DATABASE=c2-server
|
|
|
|
# GCS bucket for audio storage
|
|
GCS_BUCKET=your-bucket-name
|
|
|
|
# How long (seconds) before a node is marked offline if no checkin received
|
|
NODE_OFFLINE_THRESHOLD=90
|
|
|
|
# Google Maps — for geocoding location strings extracted from transcripts
|
|
# Enable "Geocoding API" in Cloud Console for this key
|
|
GOOGLE_MAPS_API_KEY=
|
|
NY511_API_KEY=
|
|
# 511NY feed base URL from the DAA grant (default: legacy 511ny.org/api, dead since the 511x cutover)
|
|
NY511_API_BASE=
|
|
# Ontario 511 developer key (camera provider "ontario511"; providers default OFF)
|
|
ONTARIO511_API_KEY=
|
|
# NWS weather alerts / METAR wind (server-26#237). NWS requires app name + contact in the User-Agent
|
|
NWS_USER_AGENT=DRB (you@example.com)
|
|
# Comma list of NWS state/marine area codes served
|
|
NWS_AREA=NY
|
|
|
|
# OpenAI — for transcription (Whisper), intelligence extraction, embeddings, and summaries
|
|
OPENAI_API_KEY=
|
|
SUMMARY_INTERVAL_MINUTES=15
|
|
CORRELATION_WINDOW_HOURS=4
|
|
EMBEDDING_SIMILARITY_THRESHOLD=0.82
|
|
|
|
# Browser origins allowed to call this API cross-origin (JSON list). The only
|
|
# browser caller is the frontend's Archive page (GET /calls/search). Set this
|
|
# to the exact origin the frontend is served from — scheme + host, no path.
|
|
# Defaults to https://drb.cusano.net. A "*" entry works for local dev but is
|
|
# logged as a probable misconfiguration and never gets a credentialed response.
|
|
CORS_ORIGINS=["https://drb.cusano.net"]
|
|
|
|
# Fleet-wide token edge nodes present as X-Enrollment-Token on first boot
|
|
# (POST /nodes/enroll). Shared across every node — NOT a per-node secret.
|
|
# Generate with: openssl rand -hex 32
|
|
ENROLLMENT_TOKEN=
|
|
|
|
# Shared key the Discord bot presents to reach C2 without Firebase.
|
|
# Generate with: openssl rand -hex 32
|
|
SERVICE_KEY=
|
|
|
|
# Agent/automation key for the unattended work session's headless routes
|
|
# (GET/PUT /admin/features). DELIBERATELY a different value from SERVICE_KEY —
|
|
# reusing the bot's key would make both principals indistinguishable in
|
|
# audit_log, which is the whole point of server-26#64. Leave blank to keep the
|
|
# agent path closed; the routes still take a Firebase admin token either way.
|
|
# Generate with: openssl rand -hex 32
|
|
AGENT_SERVICE_KEY=
|