Skip to content

Commit 9ca33ea

Browse files
committed
Update environment variables
1 parent e60e374 commit 9ca33ea

File tree

11 files changed

+37
-32
lines changed

11 files changed

+37
-32
lines changed

.env

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
VITE_FRONTEND_URL=http://localhost:4200
2-
31
# Backend URLs
4-
VITE_COLLABORATION_SERV_URL=http://localhost:4444
2+
VITE_CODE_SERV_URL=http://localhost:8085
3+
VITE_COLLAB_SERV_URL=http://localhost:4444
4+
VITE_GIT_FACADE_SERV_URL=http://localhost:5000
5+
VITE_SHARE_SNAPSHOT_URL=http://localhost:4200/
56
VITE_SPAN_SERV_URL=http://localhost:8083
67
VITE_USER_SERV_URL=http://localhost:8084
7-
VITE_SHARE_SNAPSHOT_URL=http://localhost:4200/
8-
VITE_GITLAB_API=http://localhost:5000
9-
VITE_CODE_SERV_URL=http://localhost:8085
10-
VITE_METRICS_SERV_URL=http://localhost:8086
118
VITE_VSCODE_SERV_URL=http://localhost:3000
129

1310
# Auth0 development credentials

.env-prod

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# The docker image of the frontend also acts as reverse proxy for the backend.
22
# This allows us to publish only one port on the Internet.
33

4-
SPAN_SERV_URL=change-span-url
5-
USER_SERV_URL=change-user-url
6-
VSCODE_SERV_URL=change-vscode-url
7-
COLLABORATION_SERV_URL=change-collaboration-url
8-
CODE_SERV_URL=change-code-url
4+
VITE_CODE_SERV_URL=change-code-url
5+
VITE_COLLAB_SERV_URL=change-collaboration-url
6+
VITE_SPAN_SERV_URL=change-span-url
7+
VITE_USER_SERV_URL=change-user-url
8+
VITE_VSCODE_SERV_URL=change-vscode-url
99

1010
VITE_AUTH_DISABLED_ACCESS_TOKEN=SPECIAL_TOKEN
1111
VITE_AUTH_DISABLED_PROFILE_NAME=Jessy Doe

default.conf.template

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ server {
44
# BEGIN User-Service
55

66
location /user {
7-
proxy_pass ${USER_URL};
7+
proxy_pass ${VITE_USER_SERV_URL};
88
proxy_http_version 1.1;
99
proxy_set_header Host $host;
1010
}
1111

1212
location /token {
13-
proxy_pass ${USER_URL};
13+
proxy_pass ${VITE_USER_SERV_URL};
1414
proxy_http_version 1.1;
1515
proxy_set_header Host $host;
1616
}
1717

1818
location /snapshot {
19-
proxy_pass ${USER_URL};
19+
proxy_pass ${VITE_USER_SERV_URL};
2020
proxy_http_version 1.1;
2121
proxy_set_header Host $host;
2222
}
@@ -26,19 +26,19 @@ server {
2626
# BEGIN Dynamic-Data
2727

2828
location ~* /v2/landscapes/[0-9a-z-]+/structure {
29-
proxy_pass ${LANDSCAPE_URL};
29+
proxy_pass ${VITE_SPAN_SERV_URL};
3030
proxy_http_version 1.1;
3131
proxy_set_header Host $host;
3232
}
3333

3434
location ~* /v2/landscapes/[0-9a-z-]+/dynamic {
35-
proxy_pass ${TRACE_URL};
35+
proxy_pass ${VITE_SPAN_SERV_URL};
3636
proxy_http_version 1.1;
3737
proxy_set_header Host $host;
3838
}
3939

4040
location ~* /v2/landscapes/[0-9a-z-]+/timestamps {
41-
proxy_pass ${TIMESTAMPS_URL};
41+
proxy_pass ${VITE_SPAN_SERV_URL};
4242
proxy_http_version 1.1;
4343
proxy_set_header Host $host;
4444
}
@@ -48,7 +48,7 @@ server {
4848
# BEGIN Static-Data
4949

5050
location /v2/code {
51-
proxy_pass ${CODE_SERV_URL};
51+
proxy_pass ${VITE_CODE_SERV_URL};
5252
proxy_http_version 1.1;
5353
proxy_set_header Host $host;
5454
}
@@ -58,14 +58,14 @@ server {
5858
# BEGIN Collab
5959

6060
location /room {
61-
proxy_pass ${COLLABORATION_URL};
61+
proxy_pass ${VITE_COLLAB_SERV_URL};
6262
proxy_http_version 1.1;
6363
proxy_set_header Upgrade $http_upgrade;
6464
proxy_set_header Connection "upgrade";
6565
}
6666

6767
location /socket.io {
68-
proxy_pass ${COLLABORATION_URL};
68+
proxy_pass ${VITE_COLLAB_SERV_URL};
6969
proxy_http_version 1.1;
7070
proxy_set_header Upgrade $http_upgrade;
7171
proxy_set_header Connection "upgrade";
@@ -79,7 +79,7 @@ server {
7979
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
8080
proxy_set_header Host $host;
8181

82-
proxy_pass ${VSCODE_SERV_URL};
82+
proxy_pass ${VITE_VSCODE_SERV_URL};
8383

8484
proxy_http_version 1.1;
8585
proxy_set_header Upgrade $http_upgrade;

src/components/share-landscape.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function ShareLandscape(args: ShareLandscapeArgs) {
4444
event.stopPropagation();
4545
try {
4646
await sendModifyAccess(args.token.value, userId, 'revoke');
47-
args.token.sharedUsersIds.filter(value => value !== userId);
47+
args.token.sharedUsersIds.filter((value) => value !== userId);
4848
useToastHandlerStore
4949
.getState()
5050
.showSuccessToastMessage(

src/components/snapshot-selection.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ export default function SnapshotSelection({
215215
<AdditionalSnapshotInfo token={personalToken} />
216216
</li>
217217
<li>
218-
<ShareSnapshot token={personalToken} reload={reload} />
218+
<ShareSnapshot
219+
token={personalToken}
220+
reload={reload}
221+
/>
219222
</li>
220223
<li>
221224
<DeleteSnapshot
@@ -236,7 +239,7 @@ export default function SnapshotSelection({
236239
)}
237240
</tbody>
238241
<tfoot>
239-
<tr>
242+
<tr>
240243
<td colSpan={3} className="p-1">
241244
<div className="d-flex flex-row justify-content-center">
242245
<Button

src/components/visualization/page-setup/sidebar/customizationbar/restructure/restructure.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
import { useShallow } from 'zustand/react/shallow';
3737

3838
const shareSnapshot = import.meta.env.VITE_SHARE_SNAPSHOT_URL;
39-
const gitlabApi = import.meta.env.VITE_GITLAB_API;
39+
const gitlabApi = import.meta.env.VITE_GIT_FACADE_SERV_URL;
4040

4141
type Issue = { title: string; content: string; screenshots: string[] };
4242
type GitlabProject = { id: string; name: string };

src/pages/landscapes.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ export default function Landscapes() {
225225
>
226226
<Tab eventKey="landscapes" title="Landscapes" id="landscape-tab">
227227
<div
228-
className={'d-flex flex-row justify-content-center selection-table'}
228+
className={
229+
'd-flex flex-row justify-content-center selection-table'
230+
}
229231
style={{ maxHeight: '80vh', overflowY: 'auto' }}
230232
>
231233
<TokenSelection

src/stores/collaboration/room-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
isLobbyJoinedResponse,
1313
} from 'explorviz-frontend/src/utils/collaboration/room-payload/receivable/lobby-joined';
1414

15-
const collaborationService = import.meta.env.VITE_COLLABORATION_SERV_URL;
15+
const collaborationService = import.meta.env.VITE_COLLAB_SERV_URL;
1616

1717
interface RoomServiceState {
1818
listRooms: () => Promise<RoomListRecord[]>;

src/stores/collaboration/web-socket.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import eventEmitter from '../../utils/event-emitter';
4545

4646
type ResponseHandler<T> = (msg: T) => void;
4747

48-
const collaborationService = import.meta.env.VITE_COLLABORATION_SERV_URL;
48+
const collaborationService = import.meta.env.VITE_COLLAB_SERV_URL;
4949

5050
export const SELF_DISCONNECTED_EVENT = 'self_disconnected';
5151

@@ -184,7 +184,10 @@ export const useWebSocketStore = create<WebSocketState>((set, get) => ({
184184

185185
closeSocket: () => {
186186
if (get().isWebSocketOpen()) {
187-
const clonedSocket = Object.assign(Object.create(Object.getPrototypeOf(get()._currentSocket)), get()._currentSocket);
187+
const clonedSocket = Object.assign(
188+
Object.create(Object.getPrototypeOf(get()._currentSocket)),
189+
get()._currentSocket
190+
);
188191
clonedSocket.disconnect();
189192
set({ _currentSocket: clonedSocket });
190193
}

src/stores/spectate-configuration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { create } from 'zustand';
22
import { useAuthStore } from 'explorviz-frontend/src/stores/auth';
33
import { useToastHandlerStore } from 'explorviz-frontend/src/stores/toast-handler';
44

5-
const collaborationServiceApi = import.meta.env.VITE_COLLABORATION_SERV_URL;
5+
const collaborationServiceApi = import.meta.env.VITE_COLLAB_SERV_URL;
66

77
interface SpectateConfigurationState {
88
spectateConfig: SpectateConfig | null; // tracked

src/stores/user-api-token.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { create } from 'zustand';
22
import { useAuthStore } from './auth';
33
import { useToastHandlerStore } from 'explorviz-frontend/src/stores/toast-handler';
44

5-
const userService = import.meta.env.USER_SERV_URL;
5+
const userService = import.meta.env.VITE_USER_SERV_URL;
66

77
export type ApiToken = {
88
uid: string;

0 commit comments

Comments
 (0)