From dbd2338dadb202f47c8f32782e749704923d0822 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 19 May 2022 15:28:30 -0500 Subject: [PATCH] configure api for KEYCLOAK_ADMIN_USER --- services/api/Dockerfile | 1 + services/api/src/clients/keycloakClient.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/api/Dockerfile b/services/api/Dockerfile index c612a8f855..57d379b0ee 100644 --- a/services/api/Dockerfile +++ b/services/api/Dockerfile @@ -29,6 +29,7 @@ RUN yarn check --verify-tree # Making sure we run in production ENV NODE_ENV=production \ LOGSDB_ADMIN_PASSWORD=admin \ + KEYCLOAK_ADMIN_USER=admin \ KEYCLOAK_ADMIN_PASSWORD=admin \ ELASTICSEARCH_URL=http://logs-db-service:9200 \ KEYCLOAK_API_CLIENT_SECRET=39d5282d-3684-4026-b4ed-04bbc034b61a \ diff --git a/services/api/src/clients/keycloakClient.ts b/services/api/src/clients/keycloakClient.ts index ed5f29b248..71944fc59a 100644 --- a/services/api/src/clients/keycloakClient.ts +++ b/services/api/src/clients/keycloakClient.ts @@ -5,7 +5,7 @@ import { getConfigFromEnv, getLagoonRouteFromEnv } from '../util/config'; export const config = { origin: getConfigFromEnv('KEYCLOAK_URL', 'http://keycloak:8080'), - user: 'admin', + user: getConfigFromEnv('KEYCLOAK_ADMIN_USER', 'admin'), pass: getConfigFromEnv('KEYCLOAK_ADMIN_PASSWORD', ''), realm: 'lagoon', apiClientSecret: getConfigFromEnv(