Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (script): Fix script creation in playground head x2

Rostislav Duginb2a94274d703
diff --git a/Dockerfile b/Dockerfile
index a7dd132c..92a8305a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -272,10 +272,13 @@ window.__RUNTIME_CONFIG__ = {
};
JSEOF
-# Inject analytics script if provided
+# Inject analytics script if provided (only if not already injected)
if [ -n "\${ANALYTICS_SCRIPT:-}" ]; then
- echo "Injecting analytics script..."
- sed -i "s#</head># \${ANALYTICS_SCRIPT}"$'\n'" </head>#" /app/ui/build/index.html
+ if ! grep -q "rybbit.databasus.com" /app/ui/build/index.html 2>/dev/null; then
+ echo "Injecting analytics script..."
+ sed -i "s#</head># \${ANALYTICS_SCRIPT}\\
+ </head>#" /app/ui/build/index.html
+ fi
fi
# Ensure proper ownership of data directory