Env Vars - Support for container env vars.
CI / Docker Lint (push) Successful in 29s

Now you can configure your container using Environmet vars.
This commit is contained in:
2024-05-12 13:21:28 +02:00
parent 0039b09d98
commit f8365e05af
5 changed files with 48 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
for i in $(env | grep SOMNIAROOMS_)
do
key=$(echo $i | cut -d '=' -f 1)
value=$(echo $i | cut -d '=' -f 2-)
echo $key=$value
# sed All files
# find /usr/share/nginx/html -type f -exec sed -i "s|${key}|${value}|g" '{}' +
# sed JS and CSS only
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
done