diff --git a/docker-compose.yaml b/docker-compose.yaml index 7fd8ce0..e0432a9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,7 @@ services: maptool: build: . + image: maptool:latest restart: unless-stopped ports: - "4567:4567" @@ -26,3 +27,19 @@ services: # docs/development.adoc for how the deploy job treats this # directory). - ./data:/app/data + + # Fakes a GNSS fix (a loop around Bratislava, see + # bin/gnss_simulator.rb/docs/development.adoc) since there's no real + # receiver attached here — the "GNSS" control would otherwise just show + # "no fix" always. Remove this service (and nothing else) whenever a real + # receiver/gpsd setup replaces it. network_mode ties it to maptool's own + # network namespace rather than a bridge network, since GpsdClient + # connects to a hardcoded 127.0.0.1:2947 — same as gpsd itself normally + # being local to the machine it serves. + gnss-simulator: + image: maptool:latest + depends_on: + - maptool + restart: unless-stopped + network_mode: "service:maptool" + command: ["ruby", "bin/gnss_simulator.rb"] diff --git a/docs/deployment.adoc b/docs/deployment.adoc index 0c3ab33..ae5c6e0 100644 --- a/docs/deployment.adoc +++ b/docs/deployment.adoc @@ -107,6 +107,18 @@ id/secret to store as the two `OAUTH_CLIENT_*` secrets above. usernames, e.g. `randy,friend1,friend2` — not their emails, the `login` field from Gitea's `/api/v1/user`. +== GNSS simulator + +`docker-compose.yaml`'s `gnss-simulator` service (`bin/gnss_simulator.rb`, +also documented for local dev in `docs/development.adoc`) runs +alongside `maptool` in production too, sharing its network namespace +(`network_mode: "service:maptool"`) so it's reachable at the +hardcoded `127.0.0.1:2947` `Maptool::GpsdClient` expects — there's no +real GNSS receiver attached to the server, so without this the "GNSS" +control would just always show "no fix". It drives a loop around +Bratislava; remove the service block (nothing else needs to change) +whenever a real receiver/gpsd setup replaces it. + == Garmin LiveTrack session webhook `POST /api/livetrack/session` (`session_id`, `session_token`, `secret` form