Skip to content

Fix SERVER_LIST_URL requiring a local /servers.json #848

Closed

Description

@R4z0r112

Hi, thats my first feature request ever, so please be kind with me :)

Description

When using the Docker image with MODE=frontend and SERVER_LIST_URL configured, the container still requires a local /servers.json file to exist.

The current entrypoint unconditionally runs:
cp /servers.json /var/www/html/servers.json

before processing SERVER_LIST_URL.

As a result, a configuration such as:
environment:
MODE: frontend
SERVER_LIST_URL: "https://example.com/server-list.json"

fails with:
cp: cannot stat '/servers.json': No such file or directory

The container therefore cannot be used with SERVER_LIST_URL alone.

Why it should be implemented

This would allow users to use the documented SERVER_LIST_URL functionality without having to create and mount an otherwise unnecessary local /servers.json file.

If SERVER_LIST_URL is configured, /servers.json should not be required.

At the same time, existing configurations using a local /servers.json should continue to work unchanged.

Optional: implementation suggestions

The entrypoint could check whether /servers.json exists before attempting to copy it.

For example:

if [[ "$MODE" == "frontend" || "$MODE" == "dual" ]]; then
if [ -f /servers.json ]; then
cp /servers.json /var/www/html/servers.json
elif [ -z "$SERVER_LIST_URL" ]; then
echo "ERROR: /servers.json not found and SERVER_LIST_URL is not set"
exit 1
fi
fi

This would result in the following behavior:

/servers.json exists → use the local server list
SERVER_LIST_URL is set → use the remote server list
neither is configured → fail with a clear error message

English is not my first language so hopefully I could transport everything correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions