Add post-video redirect to YouTube URL from env config.
After the intro finishes, users are redirected to POST_VIDEO_REDIRECT_URL loaded via generated config.js for dev, Docker, and Dokploy deployments. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Generuje config.js z zmiennych środowiskowych (np. z pliku .env).
|
||||
set -eu
|
||||
|
||||
if [ -n "${1:-}" ]; then
|
||||
OUTPUT="$1"
|
||||
elif [ -d /usr/share/nginx/html ]; then
|
||||
OUTPUT="/usr/share/nginx/html/config.js"
|
||||
else
|
||||
OUTPUT="config.js"
|
||||
fi
|
||||
|
||||
POST_VIDEO_REDIRECT_URL="${POST_VIDEO_REDIRECT_URL:-https://www.youtube.com/watch?v=kujXXtoHUbc}"
|
||||
|
||||
cat > "$OUTPUT" <<EOF
|
||||
window.SLAVIC_PULSE_CONFIG = {
|
||||
postVideoRedirectUrl: '${POST_VIDEO_REDIRECT_URL}'
|
||||
};
|
||||
EOF
|
||||
Reference in New Issue
Block a user