diff --git a/.env.example b/.env.example index e79dfc7c..f3f5dcfa 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ ORCHESTRATOR_API_HOST=http://localhost:8080 ORCHESTRATOR_API_PATH=/api ORCHESTRATOR_GRAPHQL_HOST=http://localhost:8080 ORCHESTRATOR_GRAPHQL_PATH=/api/graphql +ORCHESTRATOR_WEBSOCKET_URL=ws://localhost:8080 AUTH_ACTIVE=true NEXTAUTH_ID="keycloak" @@ -19,3 +20,6 @@ NEXTAUTH_URL=http://localhost:3000/api/auth KEYCLOAK_ADMIN=admin KEYCLOAK_ADMIN_PASSWORD=admin KEYCLOAK_PORT=8085 + +NEXT_PUBLIC_USE_WEBSOCKET=false +NEXT_PUBLIC_USE_THEME_TOGGLE=false \ No newline at end of file diff --git a/configuration/configuration.ts b/configuration/configuration.ts index 3da0ee75..b606149b 100644 --- a/configuration/configuration.ts +++ b/configuration/configuration.ts @@ -8,6 +8,7 @@ import { export const DEFAULT_GRAPHQL_CORE_ENDPOINT = 'http://localhost:8080/api/graphql'; export const DEFAULT_ORCHESTRATOR_API_BASE_URL = 'http://localhost:8080/api'; +export const DEFAULT_ORCHESTRATOR_WEBSOCKET_URL = 'ws://localhost:8080'; export const ENGINE_STATUS_ENDPOINT = '/settings/status'; export const PROCESS_STATUS_COUNTS_ENDPOINT = '/processes/status-counts'; @@ -41,6 +42,9 @@ export const getInitialOrchestratorConfig = (): OrchestratorConfig => { orchestratorApiBaseUrl + SUBSCRIPTION_ACTIONS_ENDPOINT, subscriptionProcessesEndpoint: orchestratorApiBaseUrl + SUBSCRIPTION_PROCESSES_ENDPOINT, + orchestratorWebsocketUrl: + process.env.ORCHESTRATOR_WEBSOCKET_URL || + DEFAULT_ORCHESTRATOR_WEBSOCKET_URL, authActive: process.env.AUTH_ACTIVE?.toLowerCase() != 'false', }; };