Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Add manager URL to Keycloak container (#3412)

Koenb4133a1a9ab6
diff --git a/profile/deploy.yml b/profile/deploy.yml
index 464c96d19..a1132a388 100644
--- a/profile/deploy.yml
+++ b/profile/deploy.yml
@@ -434,6 +434,14 @@ services:
KEYCLOAK_START_COMMAND:
KEYCLOAK_START_OPTS:
+ # Origin of the manager whose manager_config.json the login theme reads each realm's
+ # branding from (logo, application title, brand color, favicon). Empty means the origin
+ # that served the login page, which is what the proxy gives you: it serves the manager at
+ # / and keycloak at /auth. Set it where keycloak has an origin of its own, as it does in
+ # the dev profiles. A deployment that sets it also needs the keycloak origin in the
+ # manager's OR_WEBSERVER_ALLOWED_ORIGINS, unless the manager is in dev mode.
+ OR_MANAGER_URL: ${OR_MANAGER_URL:-}
+
# Configuration for roles to be assigned to self-registered users (when the listener is enabled)
# Example is "{\"realmRoles\":[\"restricted_user\"],\"clientRoles\":[{\"client\":\"openremote\",\"roles\":[\"read:assets\",\"write:attributes\"]}]}"
KEYCLOAK_SELF_REGISTERED_USER_ROLES: "{ }"
diff --git a/profile/dev-proxy.yml b/profile/dev-proxy.yml
index 402a19f3d..dda9ed4d2 100644
--- a/profile/dev-proxy.yml
+++ b/profile/dev-proxy.yml
@@ -28,6 +28,7 @@ services:
depends_on:
postgresql:
condition: service_healthy
+ # OR_MANAGER_URL is not set: the manager is expected on the same base URL as keycloak.
postgresql:
extends:
diff --git a/profile/dev-testing.yml b/profile/dev-testing.yml
index 72f7b7520..548ee2bb1 100644
--- a/profile/dev-testing.yml
+++ b/profile/dev-testing.yml
@@ -16,6 +16,9 @@ services:
depends_on:
postgresql:
condition: service_healthy
+ environment:
+ # manager has a different base URL and is assumed to be reachable at this URL
+ OR_MANAGER_URL: ${OR_MANAGER_URL:-http://127.0.0.1:8080}
postgresql:
extends:
diff --git a/profile/dev-ui.yml b/profile/dev-ui.yml
index 87a037bff..628b0ddcc 100644
--- a/profile/dev-ui.yml
+++ b/profile/dev-ui.yml
@@ -24,6 +24,8 @@ services:
environment:
# Prevent theme caching during dev
KEYCLOAK_START_OPTS: --spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false
+ # manager has a different base URL and is assumed to be reachable at this URL
+ OR_MANAGER_URL: ${OR_MANAGER_URL:-http://127.0.0.1:8080}
postgresql:
extends: