Add open IP camera discovery scraper (OSINT map)
Some checks failed
build-and-deploy / build (push) Failing after 5s
Some checks failed
build-and-deploy / build (push) Failing after 5s
- camera_scraper: public-directory-only discovery (Insecam-style HTML + plain-text lists), hard private-range guard (fail closed), per-host rate limiting, Nominatim geocoding at <=1 req/s, TTL'd local snapshot cache, sha256 url_hash dedupe with Postgres upsert - cameras table (migration 002) + /api/cameras?bbox= + snapshot endpoint with cache passthrough in main.py - run_camera_service: long-running cycle worker following NATS->ingester pattern; publishes events.camera for shared ingester - docker-compose camera-service profile, .env.example knobs Verified E2E against TimescaleDB+PostGIS: private-range entries dropped, dedupe across cycles holds, bbox query returns expected rows.
This commit is contained in:
parent
bce2d5c3bd
commit
69a30115cc
8 changed files with 730 additions and 0 deletions
|
|
@ -102,5 +102,39 @@ services:
|
|||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
camera-service:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
platforms: ["linux/arm64"]
|
||||
image: localhost/osint-dashboard:latest
|
||||
container_name: osint-camera-scraper
|
||||
restart: unless-stopped
|
||||
profiles: ["ingest"]
|
||||
depends_on:
|
||||
nats:
|
||||
condition: service_started
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_USER: ${DB_USER:-osint}
|
||||
DB_PASSWORD: ${DB_PASSWORD:-osint}
|
||||
DB_HOST: db
|
||||
DB_PORT: ${DB_PORT:-5432}
|
||||
DB_NAME: ${DB_NAME:-osint_data}
|
||||
NATS_URL: ${NATS_URL:-nats://nats:4222}
|
||||
CAMERA_SOURCE_URLS: ${CAMERA_SOURCE_URLS:-}
|
||||
CAMERA_SCRAPE_INTERVAL: ${CAMERA_SCRAPE_INTERVAL:-3600}
|
||||
CAMERA_REQUEST_DELAY: ${CAMERA_REQUEST_DELAY:-2.0}
|
||||
NOMINATIM_URL: ${NOMINATIM_URL:-https://nominatim.openstreetmap.org}
|
||||
NOMINATIM_MIN_INTERVAL: ${NOMINATIM_MIN_INTERVAL:-1.1}
|
||||
SNAPSHOT_CACHE_DIR: /data/snapshots
|
||||
SNAPSHOT_TTL_SECONDS: ${SNAPSHOT_TTL_SECONDS:-300}
|
||||
command: ["python", "app/run_camera_service.py"]
|
||||
entrypoint: []
|
||||
volumes:
|
||||
- camera-snapshots:/data/snapshots
|
||||
|
||||
volumes:
|
||||
osint-pgdata:
|
||||
camera-snapshots:
|
||||
|
|
|
|||
Loading…
Reference in a new issue