Skip to content

Commit 4cd3cd0

Browse files
authored
Merge pull request #11 from workfloworchestrator/417-websockets
417-websockets: Add websocket URL to configuration
2 parents 39d62c9 + 5ea979b commit 4cd3cd0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ORCHESTRATOR_API_HOST=http://localhost:8080
55
ORCHESTRATOR_API_PATH=/api
66
ORCHESTRATOR_GRAPHQL_HOST=http://localhost:8080
77
ORCHESTRATOR_GRAPHQL_PATH=/api/graphql
8+
ORCHESTRATOR_WEBSOCKET_URL=ws://localhost:8080
89

910
AUTH_ACTIVE=true
1011
NEXTAUTH_ID="keycloak"
@@ -19,3 +20,6 @@ NEXTAUTH_URL=http://localhost:3000/api/auth
1920
KEYCLOAK_ADMIN=admin
2021
KEYCLOAK_ADMIN_PASSWORD=admin
2122
KEYCLOAK_PORT=8085
23+
24+
NEXT_PUBLIC_USE_WEBSOCKET=false
25+
NEXT_PUBLIC_USE_THEME_TOGGLE=false

configuration/configuration.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
export const DEFAULT_GRAPHQL_CORE_ENDPOINT =
99
'http://localhost:8080/api/graphql';
1010
export const DEFAULT_ORCHESTRATOR_API_BASE_URL = 'http://localhost:8080/api';
11+
export const DEFAULT_ORCHESTRATOR_WEBSOCKET_URL = 'ws://localhost:8080';
1112

1213
export const ENGINE_STATUS_ENDPOINT = '/settings/status';
1314
export const PROCESS_STATUS_COUNTS_ENDPOINT = '/processes/status-counts';
@@ -41,6 +42,9 @@ export const getInitialOrchestratorConfig = (): OrchestratorConfig => {
4142
orchestratorApiBaseUrl + SUBSCRIPTION_ACTIONS_ENDPOINT,
4243
subscriptionProcessesEndpoint:
4344
orchestratorApiBaseUrl + SUBSCRIPTION_PROCESSES_ENDPOINT,
45+
orchestratorWebsocketUrl:
46+
process.env.ORCHESTRATOR_WEBSOCKET_URL ||
47+
DEFAULT_ORCHESTRATOR_WEBSOCKET_URL,
4448
authActive: process.env.AUTH_ACTIVE?.toLowerCase() != 'false',
4549
};
4650
};

0 commit comments

Comments
 (0)