Coherent merge of two coordinated features on the shared working tree: FIRMS fire heatmap (backend, t_6e404c14): - app/fire_sources.py: fetch FIRMS VIIRS area CSV (free MAP_KEY) -> NATS events.fire - fires hypertable (TimescaleDB, 1-day chunks) with natural-key PK (latitude, longitude, acq_time, satellite); idempotent ON CONFLICT DO NOTHING - alembic/versions/002_fires.py; GET /api/fires?bbox=&since= (JSON only) - POST /api/ingest/fires; ~15 min poll loop (FIRMS_INTERVAL=900) in ingester - env-driven config (FIRMS_MAP_KEY/DATASET/BBOX/INTERVAL); docs/firms.md covers the zero-cost GIBS VIIRS_SNPP_Thermal_Anomalies_375m_All tile alternative - 18 tests (parser, mapping, idempotency, API contract) verified vs real TimescaleDB+PostGIS (localhost/osint-dashboard-pg image) API keys page (frontend, t_4433cff2): - app/keystore.py: api_keys table (self-creating), FIRMS/GEMINI/TELEGRAM registry with format validation, ****last4 masking, get_api_key() - GET/POST/DELETE /api/keys (never returns full values); Keys tab in index.html DB_NULL_POOL env switch in app/database.py enables a NullPool for tests / short-lived processes that open a fresh event loop per unit.
42 lines
2.1 KiB
Text
42 lines
2.1 KiB
Text
# OSINT Dashboard — environment configuration
|
|
# Copy to `.env` and adjust. All values have safe defaults for local compose.
|
|
|
|
# ── PostgreSQL / TimescaleDB ───────────────────────────────────────────────
|
|
DB_USER=osint
|
|
DB_PASSWORD=osint
|
|
DB_HOST=db
|
|
DB_PORT=5432
|
|
DB_NAME=osint_data
|
|
|
|
# ── NATS JetStream (optional — only needed when profile `ingest` is used) ──
|
|
NATS_URL=nats://nats:4222
|
|
|
|
# ── MinIO (optional — document storage; endpoint used if wired later) ──────
|
|
MINIO_ENDPOINT=minio:9000
|
|
MINIO_ACCESS_KEY=
|
|
MINIO_SECRET_KEY=
|
|
# "true" for TLS endpoints (e.g. S3-compatible prod); "false" for local HTTP.
|
|
MINIO_SECURE=false
|
|
|
|
# ── NASA FIRMS (active fire / hotspot ingest) ──────────────────────────────
|
|
# MAP_KEY is FREE — get one at https://firms.modaps.eosdis.nasa.gov/api/map_key_info/
|
|
# (1-minute signup, no payment). Leave blank to keep fire ingest idle.
|
|
FIRMS_MAP_KEY=
|
|
# NRT VIIRS S-NPP 375m active fire detection (near-real-time).
|
|
FIRMS_DATASET=VIIRS_SNPP_NRT
|
|
# Area to poll as "minlon,minlat,maxlon,maxlat". Narrow it to reduce payload
|
|
# (e.g. CONUS "-125,24,-66,50"). Default covers most of the inhabited globe.
|
|
FIRMS_BBOX=-180,-60,180,75
|
|
# Poll cadence in seconds (~15 min). FIRMS NRT updates every ~5-10 min.
|
|
FIRMS_INTERVAL=900
|
|
# Set to 0 to disable the fire loop entirely.
|
|
INGEST_FIRES=1
|
|
|
|
# ── API keys (managed from the dashboard UI) ──────────────────────────────
|
|
# Ingest-service keys such as FIRMS_MAP_KEY, GEMINI_API_KEY and TELEGRAM_TOKEN
|
|
# are stored in the Postgres `api_keys` table and managed from the dashboard's
|
|
# "Keys" tab (GET/POST/DELETE /api/keys/{name}). You do NOT need to put them in
|
|
# .env — the UI writes straight to the DB, and ingest services read them from
|
|
# there (keystore.get_api_key), picking up changes on the next poll without a
|
|
# container restart. Keys set here in .env are only a fallback for the FIRMS
|
|
# ingestor until a value is saved via the UI.
|