From a18106ff15e3e5e460d5de6b398eb5a312ed95eb Mon Sep 17 00:00:00 2001 From: Richard Kacerek Date: Wed, 7 Oct 2026 10:09:27 +0200 Subject: [PATCH] docs: document the Coolify deployment and known limitations Co-Authored-By: Claude Sonnet 5.5 --- README.md | 41 +++++++++++++++++-- .../specs/2026-10-06-bus-board-design.md | 8 ++-- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3acaa74..63c54d0 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,27 @@ to an analog clock when there is nothing to show. Design: `docs/superpowers/specs/2026-10-06-bus-board-design.md`. Plan: `docs/superpowers/plans/2026-10-07-bus-board.md`. -## Run on the server +## Deployment (Coolify, live since 2026-10-07) + +The board runs as a Coolify application on the home server: + +- Source: **Public Repository** `https://gitea.madeinzlin.cz/rickzkm/bus-department-schedule.git`, branch `main`. + The repo must stay public: Gitea SSH is disabled, so Coolify cannot use a deploy key. +- Build pack **Docker Compose**, base directory `/`, and **Docker Compose Location `/docker-compose.yml`**. + Coolify's default is `/docker-compose.yaml` and fails with "Docker Compose file not found". +- No domain and no environment variables: the defaults in `docker-compose.yml` fit this server. +- **Update:** commit, `git push` to Gitea, then press **Deploy** in Coolify (no webhook yet). +- **Logs:** Coolify → the application → Logs, or + `ssh coolify 'docker logs --tail 20 $(docker ps --format "{{.Names}}" | grep ^screen-)'`. +- The cache lives in a named Docker volume (`/data`). A brand-new volume logs four + "no usable cache" warnings once, then downloads the pages. +- Only one container can hold the screen's serial port. Stop any other container + using it (for example a manual `docker compose up`) before deploying. + +Timetables refresh on start (only if the cache is older than 20 h) and daily at 03:00 +(retry every 15 min after a failure). + +### Running by hand on the server (debugging only) Find the stable device path (survives replug/reboot, unlike `ttyACM0`): @@ -23,8 +43,7 @@ Find the stable device path (survives replug/reboot, unlike `ttyACM0`): docker compose up --build -d docker compose logs -f screen -Timetables are cached in the `bus-board-data` volume (`/data`); they refresh on -start (only if the cache is older than 20 h) and daily at 03:00 (retry every 15 min after a failure). +Stop it again before using Coolify, for the serial-port reason above. ## If something is wrong @@ -48,3 +67,19 @@ start (only if the cache is older than 20 h) and daily at 03:00 (retry every 15 | `LINES_FILE` | `/app/lines.yaml` | line/stop/URL list | The screen library is pinned to one upstream commit in the `Dockerfile` (`LCD_COMMIT`). + +## Known limitations + +Found in review and deliberately left for later: + +- **Scheduled times only.** No live delays; footnote marks (`v`, `A`, `z`, …) are stored but not shown. +- **Special school-holiday column applies only on workdays.** Its header says "Prac.dny–školní prázdniny"; + on a special date that is a weekend or state holiday the rest-day column is used. +- **Slow start after a restart:** if the cache is older than 20 h and DSZO is slow or down, the first draw + waits for the download (up to ~80 s, once). +- **A page that only announces a future timetable** would replace the current cache at the next refresh and show + the new times early. The pages seen so far carry only the newest columns. +- **Retries:** after a failed refresh all four pages are retried every 15 min, with no backoff. +- **Daylight-saving nights:** countdowns between 00:00 and 03:00 are off by one hour on the two switch nights. +- **`zítra`** is shown for any departure on a later calendar day, including a bus shortly after midnight. +- Long stop names are not truncated; the two real stop names fit. diff --git a/docs/superpowers/specs/2026-10-06-bus-board-design.md b/docs/superpowers/specs/2026-10-06-bus-board-design.md index 8155a72..0c7be0b 100644 --- a/docs/superpowers/specs/2026-10-06-bus-board-design.md +++ b/docs/superpowers/specs/2026-10-06-bus-board-design.md @@ -146,6 +146,8 @@ vs. holiday vs. weekend) is a small piece of real judgment; the user writes it ## Delivery -Deployed as a Docker Compose resource in Coolify from the Gitea repo, with the -`/data` volume and the screen device by its `/dev/serial/by-id/` path. The manual -copy in `~/bus-board-test` on the server is removed afterwards. +**Delivered 2026-10-07.** Deployed as a Docker Compose application in Coolify from the public Gitea repo +`rickzkm/bus-department-schedule` (the repo is public because Gitea SSH is disabled, so Coolify cannot use a +deploy key). The `/data` cache is a named volume and the screen is passed through by its +`/dev/serial/by-id/` path. The manual copy in `~/bus-board-test` on the server was removed after the Coolify +deployment showed the board. See the README for deploy steps and the known limitations.