This commit is contained in:
dvirlabs 2025-11-26 03:41:47 +02:00
parent fff3b5ba76
commit 1ba9b4055e

20
docker-entrypoint.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
set -e
TEMPLATE=/usr/share/nginx/html/index.html.template
TARGET=/usr/share/nginx/html/index.html
# שומרים טמפלייט פעם אחת
if [ ! -f "$TEMPLATE" ]; then
cp "$TARGET" "$TEMPLATE"
fi
cp "$TEMPLATE" "$TARGET"
# מחליף את placeholder של הלינקים ב-JSON מה-ENV
if [ -n "$LAB_LINKS" ]; then
# משתמש ב-| כדי לא להסתבך עם / ב-URL
sed -i "s|__LAB_LINKS__|$LAB_LINKS|g" "$TARGET"
fi
nginx -g 'daemon off;'