Farsight Feeds

TrailBase Cache

TrailBase sidecar configuration, local static-feed localization, and layer counts.

TrailBase has been added to compose.yaml as a sibling service to feed-adapter.

trailbase:
  image: docker.io/trailbase/trailbase:latest
  ports:
    - "${TRAILBASE_PORT:-4001}:4000"
  volumes:
    - trailbase-data:/app/traildepot

The adapter receives:

VariableValuePurpose
TRAILBASE_URLhttp://trailbase:4000Internal compose URL for snapshot cache writes and reads
TRAILBASE_ADMIN_TOKENenvironment-providedPlaceholder for privileged schema/cache setup

Local Static Feed Localization

Run the localizer from the feed repo root:

python3 scripts/localize-trailbase.py

It writes:

PathPurpose
trailbase/feeds-local.sqliteSQLite cache containing every catalog dataset, extracted records, generated GeoJSON-compatible geometry, layer totals, and trust assertions
trailbase/schema.sqlRepeatable schema export for the local cache tables
datasets/_layer-counts.jsonMachine-readable layer, dataset, record, geometry, and assertion counts

Then regenerate this page:

python3 docs-fumadocs/scripts/generate-trailbase-cache.py

Current generated totals:

MetricCount
Datasets localized78
Layer keys localized75
Records localized316,960
Records with generated geometry314,911
Active bases records55,464

Both bases assertions pass: bases.sniff_min_750 at 55,464 records, and bases.required_sources_present now reports all required base-source inputs are present.

Layer Counts

These counts come from datasets/_layer-counts.json and the feed_layers table in trailbase/feeds-local.sqlite.

LayerDatasetsRecordsGeometry records
accelerators1112112
airfields1111111
bases155,46455,464
cables18686
centralBanks11414
cloudRegions12626
commodityHubs11010
commodityPorts27373
conflicts11010
cyberThreats11590
datacenters2344344
demo3dAssets144
demo3dCallouts144
demo3dFootprints133
demo3dTracks144
economic14141
euAcLines16,6926,692
euClusteredAcTopology1456456
euCountryLoad13434
euEnergyNodes1256256
euGenerationAssets121,49621,496
euHvdcLinks17272
euOffshoreRegions1126126
euOnshoreRegions1256256
euPowerGrid16,7646,764
euRenewablePotential1687687
financialCenters11919
flightCorridors166
flights1111111
gulfInvestments14242
hotspots12929
irradiators1124124
military1230
minerals11111
miningSites17171
nations1242242
nuclear1128128
pipelines18888
powerTransmission155,44755,447
processingPlants11111
reference:bypassCorridors1260
reference:cartographicCorrections140
reference:commodities1330
reference:commodityMarketSymbols1310
reference:commodityMiners1290
reference:countriesCurated1310
reference:entities1660
reference:euCostAssumptions15350
reference:euOffwindConnectionCosts1150
reference:hs2Sectors1980
reference:marketSymbols1480
reference:militaryAircraftTypes1820
reference:militaryBases1226226
reference:militaryBasesCommunity154,67254,672
reference:militaryBasesCurated1226226
reference:militaryBasesExpanded1210210
reference:militaryBasesRegistry1832832
reference:militaryBasesSourceStatus150
reference:militaryCallsigns11290
reference:militaryHexRanges1290
reference:pipelineRegistryGas12930
reference:pipelineRegistryOil13250
reference:scenarioTemplates160
reference:startupEcosystems1370
reference:techCompanies1320
sanctions190
spaceports11212
startupHubs13232
stockExchanges12929
techHQs1280280
tradeRoutes12121
usPowerPlants19,8339,833
usSubstations168,48768,487
waterways22626
webcams130,55530,551

Operational Notes

  • TrailBase stores data in /app/traildepot, backed by the trailbase-data Docker volume.
  • The host port defaults to 4001; set TRAILBASE_PORT=4000 and TRAILBASE_PUBLIC_URL=http://localhost:4000 if you want to expose the admin UI on the old port.
  • First-run admin credentials are printed in the TrailBase container logs.
  • The health check targets /api/healthcheck.
  • The current Rust adapter does not yet write live snapshots into TrailBase; it exposes the URL and documents the integration point for the next cache writer/reader pass.
  • The Farsight app's military-base map path (adapter/static/farsight, served at /farsight) calls the military-base RPC, which reads Redis seed keys such as military:bases:active; it does not read trailbase/feeds-local.sqlite directly yet. If the local FEEDS cache contains a base but the app map does not show it, check the seed/reader path and stale client/server caches.

On this page