Frontend first draft

This commit is contained in:
Arseni
2025-11-13 15:06:15 +03:00
parent e47f343afb
commit ddb54ddfdc
504 changed files with 25498 additions and 1 deletions

25
frontend/pweb/entrypoint.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
replace_env_var() {
local var_name=$1
local placeholder="%%$var_name%%"
local value=$(eval echo \$$var_name)
# inject value to the index.html
sed -i "s|$placeholder|$value|g" /usr/share/pweb/index.html
}
echo "Starting Container"
replace_env_var "WS_PROTOCOL"
replace_env_var "WS_ENDPOINT"
replace_env_var "API_PROTOCOL"
replace_env_var "SERVICE_HOST"
replace_env_var "API_ENDPOINT"
replace_env_var "AMPLITUDE_SECRET"
replace_env_var "DEFAULT_LOCALE"
replace_env_var "DEFAULT_CURRENCY"
echo "Passing by launch command"
# Execute the passed command (e.g., starting Nginx)
# exec "$@"
exec nginx -g 'daemon off;'