librespeed / speedtest

Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more

Home Page:https://librespeed.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Standalone mode does not support multiple servers

erlisdhima opened this issue · comments

Hi,

It seems like servers.json is not being used by index.php in standalone mode.
Was this done on purpose?
Based on the documentation standalone includes both frontend and backend (files are included both in the server).

I'm trying to specify two servers, one remote and one local (the speedtest instance itself).

Ideally we would have a check if servers.json exists and if so, use that file, otherwise fallback to local testing.

Let me know if this makes sense.

Thanks in advance!

Yeah, standalone mode is made for ease of installation so it doesn't support multiple servers, but there's nothing stopping you from creating 2 docker containers on the same machine, a backend and a frontend.

I was trying to not create extra containers.
Is it possible you may consider doing this change in the future?

It's unlikely to happen in the near future, I started working full time a couple years ago and all my projects have been pretty much on hold since because I'm too busy.

Are you still accepting PRs? I can try to work on it.

Sure, go ahead, I'd put it behind an environment variable that's disabled by default, that way it doesn't impact existing users.

Great! I'll try your suggestion.
Will update this issue when I have something ready.

Thanks for coming back so quickly! :)

I think #540 contains what @erlisdhima wants