docs: document the Coolify deployment and known limitations

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
rickzkmandClaude Sonnet 5.5 committed 2026-10-07 10:09:27 +02:00
1 parent 3e38f764fd
commit a18106ff15
2 files changed
+43 -6

No files matched your search

+38 -3
View File
@@ -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.