feat: docker enterypoint, dockerfile and dynamic var for buid

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
shahdlala66
2026-05-06 11:32:26 +02:00
parent ff75c8ce2f
commit 29f2127317
10 changed files with 113 additions and 5 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
set -e
# Replace placeholders in env.template.js with environment variables and write env.js
TEMPLATE_PATH="/usr/share/nginx/html/env.template.js"
TARGET_PATH="/usr/share/nginx/html/env.js"
if [ -f "$TEMPLATE_PATH" ]; then
echo "Rendering runtime config from $TEMPLATE_PATH"
echo "Using environment variables:"
printenv
echo "----"
envsubst < "$TEMPLATE_PATH" > "$TARGET_PATH"
else
echo "No runtime template found at $TEMPLATE_PATH, skipping"
fi
exec nginx -g 'daemon off;'