Fix OpenRemote: Use localhost:8080 for token URL

- Replace openremote-keycloak-1 (internal Docker) with localhost:8080 (Traefik)
- Fixes [Errno -2] Name or service not known error
This commit is contained in:
Eric FELIXINE
2026-05-04 23:43:46 -04:00
parent 48aa386aae
commit 6ee9e5103e

View File

@@ -668,7 +668,7 @@ def _get_or_token() -> str:
return _or_token_cache["token"]
try:
# Use password grant with admin user (full rights)
token_url = f"http://openremote-keycloak-1:8080/auth/realms/{OR_REALM}/protocol/openid-connect/token"
token_url = f"http://localhost:8080/auth/realms/{OR_REALM}/protocol/openid-connect/token"
client_id = os.environ.get("OR_CLIENT_ID", "openremote")
client_secret = os.environ.get("OR_CLIENT_SECRET", "QVTnyObwXdpQ0Vuc60kFSonidK49FiXb")
data = urllib.parse.urlencode({