Compare commits

...

1 Commits

Author SHA1 Message Date
leo 0999f2ec45 (devex) add LIVEKIT_INTERNAL_URL for server-to-server communication
Introduced a LIVEKIT_INTERNAL_URL environment variable for
container-to-container LiveKit communication, using http://livekit:7880 in development.
LIVEKIT_API_URL continues to serve browser-facing requests, and
create_livekit_client() prefers the internal URL when set, preserving
 backwards compatibility.
2026-03-18 18:38:59 +01:00
3 changed files with 11 additions and 1 deletions
+1
View File
@@ -57,6 +57,7 @@ OIDC_RS_CLIENT_SECRET=ThisIsAnExampleKeyForDevPurposeOnly
LIVEKIT_API_SECRET=secret
LIVEKIT_API_KEY=devkey
LIVEKIT_API_URL=http://127.0.0.1.nip.io:7880
LIVEKIT_INTERNAL_URL=http://livekit:7880
LIVEKIT_VERIFY_SSL=False
ALLOW_UNREGISTERED_ROOMS=False
+5 -1
View File
@@ -212,7 +212,11 @@ def create_livekit_client(custom_configuration=None):
custom_session = aiohttp.ClientSession(connector=connector)
# Use default configuration if none provided
configuration = custom_configuration or settings.LIVEKIT_CONFIGURATION
configuration = {
**(custom_configuration or settings.LIVEKIT_CONFIGURATION),
"url": settings.LIVEKIT_INTERNAL_URL
or (custom_configuration or settings.LIVEKIT_CONFIGURATION)["url"],
}
return LiveKitAPI(session=custom_session, **configuration)
+5
View File
@@ -619,6 +619,11 @@ class Base(Configuration):
),
"url": values.Value(environ_name="LIVEKIT_API_URL", environ_prefix=None),
}
# Internal URL for server-to-server LiveKit API calls (e.g. container-to-container).
# Defaults to LIVEKIT_API_URL when not set.
LIVEKIT_INTERNAL_URL = values.Value(
"", environ_name="LIVEKIT_INTERNAL_URL", environ_prefix=None
)
LIVEKIT_FORCE_WSS_PROTOCOL = values.BooleanValue(
False, environ_name="LIVEKIT_FORCE_WSS_PROTOCOL", environ_prefix=None
)