Repository navigation
Point classic UI at mounted /servers.json in Docker entrypoint - #870
Conversation
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
sstidl
left a comment
There was a problem hiding this comment.
SERVER_LIST_URL must be used
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
PR Summary by QodoLoad mounted Docker server lists in the classic UI
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding |
There was a problem hiding this comment.
🟢 Approval recommended
The focused fallback preserves explicit URL precedence and unmounted standalone behavior, with regression coverage and no unresolved findings.
No open issues 🎉
What changed in this PR
Fixes #841 by making the classic Docker UI load a mounted /servers.json through the existing server-list URL handling.
Changes:
- Defaults
SERVER_LIST_URLtoserver-list.jsonwhen a mounted list exists, preserving explicit URL overrides. - Adds a regression test that verifies the classic page fetches the list and populates its server selector.
| File | Description |
|---|---|
tests/e2e/classic-server-list.spec.js |
Tests mounted-list loading and classic server selection. |
docker/entrypoint.sh |
Routes mounted server lists through existing URL configuration. |
Review effort: Balanced
In Docker, mounting
/servers.jsonwithout settingSERVER_LIST_URLproduced a server dropdown in the modern UI but not inindex-classic.html. The classic page ships with an emptySPEEDTEST_SERVERSarray, so it ran as a standalone install and never loaded the list.docker/entrypoint.shonly rewroteindex-classic.htmlinside theSERVER_LIST_URLbranch. The mounted-file branch copied/servers.jsontoserver-list.json, which the modern page loads by default, but left classic untouched./servers.jsonbranch, whenSERVER_LIST_URLis empty, run the same rangesedused forSERVER_LIST_URLto replace the array with"server-list.json":SERVER_LIST_URLstill takes precedence. Its existingsedruns later and overwrites this value.server-list.jsongenerated for the local backend is not wired into classic, so the standalone classic regression test is unaffected.No test is included. The existing Playwright tests use the Docker stack, so this likely needs an E2E case that mounts
servers.jsonwithoutSERVER_LIST_URLand asserts that the classic page shows the server dropdown. I only checked thesedagainst GNUsed. The Alpine image uses busyboxsed, so thec\handling there should be confirmed.