Skip to content

Commit debc18d

Browse files
committed
docs(transit): document TRANSIT_SOURCE mirror vs build mode
Operator docs + .env.example for the new mirror/build switch: mirror (default) consumes Transitous's published artifacts, build clones + runs its scripts; realtime stays on our own feed-proxy in both modes.
1 parent 641540b commit debc18d

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

docs/docs/guides/transit-engines.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,28 @@ The pipeline, its lockfile-pinned Transitous ref, and the cron schedule live in
209209
the data-manager service; for everyday operation, just leaving `motis-staging`
210210
enabled gives you a hands-off daily update with a built-in rollback.
211211

212+
#### Where the data comes from: `mirror` vs `build`
213+
214+
The pipeline can get its GTFS + MOTIS config two ways, selected by
215+
`TRANSIT_SOURCE` in `infra/docker/.env`:
216+
217+
- **`mirror` (default)** — download Transitous's already-processed output from
218+
`api.transitous.org/gtfs/` (the cleaned `*.gtfs.zip`, `config.yml`, and
219+
`license.json` their own nodes consume). This skips the slow, fragile fetch +
220+
`gtfsclean` step entirely and inherits upstream's per-feed credential and
221+
scraper handling for free. Override the source with
222+
`TRANSITOUS_ARTIFACT_BASE_URL`.
223+
- **`build`** — clone the Transitous catalog and run its scripts (`fetch.py`,
224+
`generate-motis-config.py`) yourself. Use this when you want to control feed
225+
selection (`TRANSITOUS_COUNTRIES`) beyond what the published set offers, or
226+
prefer not to depend on the upstream artifact server.
227+
228+
Both modes are otherwise identical: the same staging → smoke-test → atomic
229+
promote tail, and **realtime always flows through your own feed-proxy** (the
230+
published config's `rt.triptix.tech` URLs are repointed onto it), so your
231+
realtime stays independent of Transitous infrastructure. Switch modes by setting
232+
`TRANSIT_SOURCE` and recreating the data-manager service.
233+
212234
A few specifics worth knowing as an operator:
213235

214236
- **Cadence.** The full sync runs on `TRANSITOUS_SYNC_CRON`, default `0 3 * * *`

infra/docker/.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ DATA_MANAGER_AUTH_TOKEN=
8585
# the service-network DNS name (e.g. `http://data-manager:4000`).
8686
# DATA_MANAGER_URL=http://data-manager:4000
8787

88+
# Where the daily Transitous sync gets its data:
89+
# mirror (default) — download Transitous's pre-processed output from
90+
# api.transitous.org/gtfs/ (fast; skips the slow fetch + gtfsclean).
91+
# build — clone the catalog and run Transitous's own scripts
92+
# (fetch.py + generate-motis-config.py) yourself.
93+
# Realtime always flows through our own feed-proxy in both modes.
94+
# TRANSIT_SOURCE=mirror
95+
# Override the mirror artifact base URL (mirror mode only).
96+
# TRANSITOUS_ARTIFACT_BASE_URL=https://api.transitous.org/gtfs/
97+
8898
# Cron schedule for the daily Transitous sync (E7). Use `disabled` to
8999
# turn it off entirely (e.g. on staging where you trigger manually).
90100
# TRANSITOUS_SYNC_CRON=0 3 * * *

0 commit comments

Comments
 (0)