Standalone module extracted from the tracksolid repo (was migrations 21-23 + tools/import_tickets.py). Owns the `tickets` schema in the shared tracksolid_db. - migrations/01_tickets_schema.sql: consolidated final-state schema (tickets.inc/ crq raw-jsonb-first, geo_clusters + geo_locations gazetteers, geom trigger, reporting.fn_tickets_for_map) - import_tickets.py: rustfs bucket ingest + cluster/location geocoding (LocationIQ/OpenCage, viewbox-bounded + cluster-distance guard) - run_migrations.py, shared.py (self-contained), pyproject, .env.example, README The DB stays in tracksolid_db; dashboard_api keeps serving /webhook/tickets; the Tickets map stays a FleetOps tab. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
775 B
Text
17 lines
775 B
Text
# fleettickets — copy to .env and fill in. NEVER commit the real .env.
|
|
|
|
# Shared database (the `tickets` schema lives in tracksolid_db; internal Docker host)
|
|
DATABASE_URL=postgresql://tracksolid_owner:<password>@timescale_db:5432/tracksolid_db
|
|
|
|
# rustfs / S3 — source ticket snapshots (automations/{inc,crq}/latest.json)
|
|
RUSTFS_ENDPOINT=https://s3.rahamafresh.com
|
|
RUSTFS_ACCESS_KEY=<key>
|
|
RUSTFS_SECRET_KEY=<secret>
|
|
RUSTFS_REGION=us-east-1
|
|
TICKETS_BUCKET=tickets
|
|
|
|
# Geocoder (keyed — public Nominatim rate-limits bulk)
|
|
GEOCODER_PROVIDER=locationiq # locationiq | opencage
|
|
GEOCODER_API_KEY=<key>
|
|
GEOCODER_MIN_INTERVAL_S=1.1 # throttle to provider TOS
|
|
GEOCODER_MAX_KM=25 # reject a location geocode this far from its cluster centroid
|