Skip to content

Commit c37d8ec

Browse files
committed
Update environment variables
1 parent b6d8421 commit c37d8ec

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

.env-prod renamed to .env.production

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ VITE_VSCODE_SERV_URL=change-vscode-url
99

1010
VITE_AUTH_DISABLED_ACCESS_TOKEN=SPECIAL_TOKEN
1111
VITE_AUTH_DISABLED_PROFILE_NAME=Jessy Doe
12-
VITE_AUTH_DISABLED_NICKNAME=Jessy
12+
VITE_AUTH_DISABLED_NICKNAME=change-nickname
1313
VITE_AUTH_DISABLED_SUB=9000
1414

1515
VITE_ONLY_SHOW_TOKEN=change-token

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 ${NGINX_COLLAB_SERV_URL};
7+
proxy_pass ${USER_URL};
88
proxy_http_version 1.1;
99
proxy_set_header Host $host;
1010
}
1111

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

1818
location /snapshot {
19-
proxy_pass ${NGINX_COLLAB_SERV_URL};
19+
proxy_pass ${USER_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 ${NGINX_SPAN_SERV_URL};
29+
proxy_pass ${LANDSCAPE_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 ${NGINX_SPAN_SERV_URL};
35+
proxy_pass ${TRACE_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 ${NGINX_SPAN_SERV_URL};
41+
proxy_pass ${TIMESTAMPS_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 ${NGINX_CODE_SERV_URL};
51+
proxy_pass ${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 ${NGINX_COLLAB_SERV_URL};
61+
proxy_pass ${COLLABORATION_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 ${NGINX_COLLAB_SERV_URL};
68+
proxy_pass ${COLLABORATION_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 ${NGINX_VSCODE_SERV_URL};
82+
proxy_pass ${VSCODE_SERV_URL};
8383

8484
proxy_http_version 1.1;
8585
proxy_set_header Upgrade $http_upgrade;

variable-substitute.sh

100644100755
+10-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
#!/bin/sh
22
set -eu
33

4-
sed -i "s#change-code-url#$FRONTEND_HOST_URL#g" /usr/share/nginx/html/index.html
4+
echo "FRONTEND_HOST_URL: $FRONTEND_HOST_URL"
55

6-
sed -i "s#change-span-url#$FRONTEND_HOST_URL#g" /usr/share/nginx/html/index.html
6+
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|change-code-url|$FRONTEND_HOST_URL|g" '{}' +
77

8-
sed -i "s#change-user-url#$FRONTEND_HOST_URL#g" /usr/share/nginx/html/index.html
8+
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|change-vscode-url|$FRONTEND_HOST_URL|g" '{}' +
99

10-
sed -i "s#change-vscode-url#$FRONTEND_HOST_URL#g" /usr/share/nginx/html/index.html
10+
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|change-user-url|$FRONTEND_HOST_URL|g" '{}' +
1111

12-
sed -i "s#change-collaboration-url#$FRONTEND_HOST_URL#g" /usr/share/nginx/html/index.html
12+
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|change-collaboration-url|$FRONTEND_HOST_URL|g" '{}' +
1313

14-
sed -i "s#change-frontend-host-name#$FRONTEND_HOST_NAME#g" /usr/share/nginx/html/index.html
14+
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|change-span-url|$FRONTEND_HOST_URL|g" '{}' +
1515

16-
DEFAULT_NICKNAME="${NO_AUTH_USER_NICKNAME:-Jessy}"
17-
sed -i "s#Jessy#$DEFAULT_NICKNAME#g" /usr/share/nginx/html/index.html
16+
DEFAULT_NICKNAME="${VITE_AUTH_DISABLED_NICKNAME:-Jessy}"
17+
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|change-nickname|$FRONTEND_HOST_URL|g" '{}' +
18+
sed -i "s#change-nickname#$DEFAULT_NICKNAME#g" /usr/share/nginx/html/index.html
1819

1920
DEFAULT_TOKEN="${ONLY_SHOW_TOKEN:-}"
20-
sed -i "s#change-token#$DEFAULT_TOKEN#g" /usr/share/nginx/html/index.html
21+
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|change-token|$DEFAULT_TOKEN|g" '{}' +
2122

2223
exec "$@"

0 commit comments

Comments
 (0)