-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
27 lines (19 loc) · 797 Bytes
/
start.sh
File metadata and controls
27 lines (19 loc) · 797 Bytes
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
#!/bin/bash
# First, assemble a script to set all environment variables beginning with DATA_BOARD_PULIC on the client.
# This is done so the app can use environment variables which are not set at built time, but rather when the container is run.
# Recreate env config file
rm ./env-config.js
touch ./env-config.js
# Add assignment
echo "window._env_ = {" >> ./env-config.js
# Loop through all environment variables
for varname in $(printenv | grep -o 'DATA_BOARD_PUBLIC[^=]*' | sort -u); do
# Read the value of the environment variable
value="${!varname}"
# Append variable name and value to the file
echo " $varname: \"$value\"," >> ./env-config.js
done
echo "}" >> ./env-config.js
/configure-backend-proxy.sh
# Execute the command specified as argument to the script
exec "$@"