Repository navigation
Allow frontend Docker mode to use SERVER_LIST_URL without a mounted /servers.json - #849
Conversation
Co-authored-by: sstidl <[email protected]>
SERVER_LIST_URL without a mounted /servers.json
PR Summary by QodoSupport SERVER_LIST_URL-only frontend Docker mode
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
🟡 Changes recommended
The default classic frontend path can leave an executable ];, causing a JavaScript syntax error for remote-only configurations.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Enables Docker frontend mode to use SERVER_LIST_URL without a mounted /servers.json.
Changes:
- Updates entrypoint server-list handling and validation.
- Adds remote frontend Docker/Playwright coverage.
- Adds a CORS-capable fixture server and remote-list fixture.
File summaries
| File | Description |
|---|---|
tests/e2e/static-server.js |
Serves fixtures with CORS support. |
tests/e2e/modes.spec.js |
Tests remote-only frontend behavior. |
tests/e2e/helpers/env.js |
Adds the remote frontend URL. |
tests/e2e/global-setup.js |
Waits for the new service. |
tests/e2e/fixtures/servers-frontend-remote.json |
Provides the remote server-list fixture. |
tests/docker-compose-playwright.yml |
Adds the remote-list frontend service. |
playwright.config.js |
Uses the custom static fixture server. |
docker/entrypoint.sh |
Handles local and remote server-list configuration. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Frontend Docker mode still attempted to copy
/servers.jsonbefore applyingSERVER_LIST_URL, so containers configured with only a remote server list failed at startup. This change makesSERVER_LIST_URLsufficient on its own while preserving the existing mounted-file flow.Entrypoint behavior
/servers.jsoncopy so frontend/dual mode only uses it when the file exists.SERVER_LIST_URLas a valid frontend configuration when no local/servers.jsonis mounted.Regression coverage
/servers.jsonand usesSERVER_LIST_URL.Resulting config paths
/servers.jsonSERVER_LIST_URLdocker run \ -e MODE=frontend \ -e SERVER_LIST_URL="https://example.com/custom-server-list.json" \ -p 80:8080 \ ghcr.io/librespeed/speedtest