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/traildepotThe adapter receives:
| Variable | Value | Purpose |
|---|---|---|
TRAILBASE_URL | http://trailbase:4000 | Internal compose URL for snapshot cache writes and reads |
TRAILBASE_ADMIN_TOKEN | environment-provided | Placeholder for privileged schema/cache setup |
Local Static Feed Localization
Run the localizer from the feed repo root:
python3 scripts/localize-trailbase.pyIt writes:
| Path | Purpose |
|---|---|
trailbase/feeds-local.sqlite | SQLite cache containing every catalog dataset, extracted records, generated GeoJSON-compatible geometry, layer totals, and trust assertions |
trailbase/schema.sql | Repeatable schema export for the local cache tables |
datasets/_layer-counts.json | Machine-readable layer, dataset, record, geometry, and assertion counts |
Then regenerate this page:
python3 docs-fumadocs/scripts/generate-trailbase-cache.pyCurrent generated totals:
| Metric | Count |
|---|---|
| Datasets localized | 78 |
| Layer keys localized | 75 |
| Records localized | 316,960 |
| Records with generated geometry | 314,911 |
Active bases records | 55,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.
| Layer | Datasets | Records | Geometry records |
|---|---|---|---|
accelerators | 1 | 112 | 112 |
airfields | 1 | 111 | 111 |
bases | 1 | 55,464 | 55,464 |
cables | 1 | 86 | 86 |
centralBanks | 1 | 14 | 14 |
cloudRegions | 1 | 26 | 26 |
commodityHubs | 1 | 10 | 10 |
commodityPorts | 2 | 73 | 73 |
conflicts | 1 | 10 | 10 |
cyberThreats | 1 | 159 | 0 |
datacenters | 2 | 344 | 344 |
demo3dAssets | 1 | 4 | 4 |
demo3dCallouts | 1 | 4 | 4 |
demo3dFootprints | 1 | 3 | 3 |
demo3dTracks | 1 | 4 | 4 |
economic | 1 | 41 | 41 |
euAcLines | 1 | 6,692 | 6,692 |
euClusteredAcTopology | 1 | 456 | 456 |
euCountryLoad | 1 | 34 | 34 |
euEnergyNodes | 1 | 256 | 256 |
euGenerationAssets | 1 | 21,496 | 21,496 |
euHvdcLinks | 1 | 72 | 72 |
euOffshoreRegions | 1 | 126 | 126 |
euOnshoreRegions | 1 | 256 | 256 |
euPowerGrid | 1 | 6,764 | 6,764 |
euRenewablePotential | 1 | 687 | 687 |
financialCenters | 1 | 19 | 19 |
flightCorridors | 1 | 6 | 6 |
flights | 1 | 111 | 111 |
gulfInvestments | 1 | 42 | 42 |
hotspots | 1 | 29 | 29 |
irradiators | 1 | 124 | 124 |
military | 1 | 23 | 0 |
minerals | 1 | 11 | 11 |
miningSites | 1 | 71 | 71 |
nations | 1 | 242 | 242 |
nuclear | 1 | 128 | 128 |
pipelines | 1 | 88 | 88 |
powerTransmission | 1 | 55,447 | 55,447 |
processingPlants | 1 | 11 | 11 |
reference:bypassCorridors | 1 | 26 | 0 |
reference:cartographicCorrections | 1 | 4 | 0 |
reference:commodities | 1 | 33 | 0 |
reference:commodityMarketSymbols | 1 | 31 | 0 |
reference:commodityMiners | 1 | 29 | 0 |
reference:countriesCurated | 1 | 31 | 0 |
reference:entities | 1 | 66 | 0 |
reference:euCostAssumptions | 1 | 535 | 0 |
reference:euOffwindConnectionCosts | 1 | 15 | 0 |
reference:hs2Sectors | 1 | 98 | 0 |
reference:marketSymbols | 1 | 48 | 0 |
reference:militaryAircraftTypes | 1 | 82 | 0 |
reference:militaryBases | 1 | 226 | 226 |
reference:militaryBasesCommunity | 1 | 54,672 | 54,672 |
reference:militaryBasesCurated | 1 | 226 | 226 |
reference:militaryBasesExpanded | 1 | 210 | 210 |
reference:militaryBasesRegistry | 1 | 832 | 832 |
reference:militaryBasesSourceStatus | 1 | 5 | 0 |
reference:militaryCallsigns | 1 | 129 | 0 |
reference:militaryHexRanges | 1 | 29 | 0 |
reference:pipelineRegistryGas | 1 | 293 | 0 |
reference:pipelineRegistryOil | 1 | 325 | 0 |
reference:scenarioTemplates | 1 | 6 | 0 |
reference:startupEcosystems | 1 | 37 | 0 |
reference:techCompanies | 1 | 32 | 0 |
sanctions | 1 | 9 | 0 |
spaceports | 1 | 12 | 12 |
startupHubs | 1 | 32 | 32 |
stockExchanges | 1 | 29 | 29 |
techHQs | 1 | 280 | 280 |
tradeRoutes | 1 | 21 | 21 |
usPowerPlants | 1 | 9,833 | 9,833 |
usSubstations | 1 | 68,487 | 68,487 |
waterways | 2 | 26 | 26 |
webcams | 1 | 30,555 | 30,551 |
Operational Notes
- TrailBase stores data in
/app/traildepot, backed by thetrailbase-dataDocker volume. - The host port defaults to
4001; setTRAILBASE_PORT=4000andTRAILBASE_PUBLIC_URL=http://localhost:4000if 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 asmilitary:bases:active; it does not readtrailbase/feeds-local.sqlitedirectly 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.