-
Notifications
You must be signed in to change notification settings - Fork 2
/
entryPoint.sh
35 lines (28 loc) · 937 Bytes
/
entryPoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -xe
: "${VITE_BACKEND_URL?Need VITE_BACKEND_URL}"
set -xe
: "${VITE_AUTH_URL?Need VITE_AUTH_URL}"
set -xe
: "${VITE_AUTH_BASE_URL?Need VITE_AUTH_BASE_URL}"
set -xe
: "${VITE_COOKIE_DOMAIN?Need VITE_COOKIE_DOMAIN}"
for file in /usr/share/nginx/html/assets/*;
do
if [[ -f $file ]]; then
sed -i "s|VITE_BACKEND_URL_REPLACE|$VITE_BACKEND_URL|g" $file
sed -i "s|VITE_AUTH_URL_REPLACE|$VITE_AUTH_URL|g" $file
sed -i "s|VITE_AUTH_BASE_URL_REPLACE|$VITE_AUTH_BASE_URL|g" $file
sed -i "s|VITE_COOKIE_DOMAIN_REPLACE|$VITE_COOKIE_DOMAIN|g" $file
fi
done
for file in /usr/share/nginx/html/*;
do
if [[ -f $file ]]; then
sed -i "s|VITE_BACKEND_URL_REPLACE|$VITE_BACKEND_URL|g" $file
sed -i "s|VITE_AUTH_URL_REPLACE|$VITE_AUTH_URL|g" $file
sed -i "s|VITE_AUTH_BASE_URL_REPLACE|$VITE_AUTH_BASE_URL|g" $file
sed -i "s|VITE_COOKIE_DOMAIN_REPLACE|$VITE_COOKIE_DOMAIN|g" $file
fi
done
exec "$@"