Update default configuration and Docker scripts for backend urls.

This commit is contained in:
Joachim Bauch 2025-07-17 13:52:39 +02:00
commit ddad70b4c5
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02
3 changed files with 18 additions and 10 deletions

View file

@ -30,7 +30,8 @@ The running container can be configured through different environment variables:
- `BACKENDS`: Space-separated list of backend ids.
- `BACKENDS_TIMEOUT`: Timeout in seconds for requests to backends.
- `CONNECTIONS_PER_HOST`: Maximum number of concurrent backend connections per host.
- `BACKEND_<ID>_URL`: Url of backend `ID` (where `ID` is the uppercase backend id).
- `BACKEND_<ID>_URLS`: Comma-separated list of urls of backend `ID` (where `ID` is the uppercase backend id).
- `BACKEND_<ID>_URL`: Url of backend `ID` (where `ID` is the uppercase backend id, deprecated).
- `BACKEND_<ID>_SHARED_SECRET`: Shared secret for backend `ID` (where `ID` is the uppercase backend id).
- `BACKEND_<ID>_SESSION_LIMIT`: Optional session limit for backend `ID` (where `ID` is the uppercase backend id).
- `BACKEND_<ID>_MAX_STREAM_BITRATE`: Optional maximum bitrate for audio/video streams in backend `ID` (where `ID` is the uppercase backend id).

View file

@ -273,9 +273,15 @@ if [ ! -f "$CONFIG" ]; then
for backend in $BACKENDS; do
echo "[$backend]" >> "$CONFIG"
declare var="BACKEND_${backend^^}_URL"
declare var="BACKEND_${backend^^}_URLS"
if [ -n "${!var}" ]; then
echo "url = ${!var}" >> "$CONFIG"
echo "urls = ${!var}" >> "$CONFIG"
else
declare var_compat="BACKEND_${backend^^}_URL"
if [ -n "${!var_compat}" ]; then
echo "Variable $var_compat is deprecated, use $var instead."
echo "urls = ${!var_compat}" >> "$CONFIG"
fi
fi
declare var="BACKEND_${backend^^}_SHARED_SECRET"