Pre-bake some vars and change telemetry handling

This commit is contained in:
Reginald Bondoc
2022-12-05 21:17:59 +01:00
parent 142a38ae3c
commit bb47f7a92f
12 changed files with 130 additions and 58 deletions

14
frontend/scripts/start.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
scripts/replace-variable.sh "$BAKED_NEXT_PUBLIC_POSTHOG_API_KEY" "$NEXT_PUBLIC_POSTHOG_API_KEY"
if [ "$INFISICAL_TELEMETRY_ENABLED" != "false" ]; then
echo "Telemetry is enabled"
scripts/set-telemetry.sh true
else
echo "Client opted out of telemetry"
scripts/set-telemetry.sh false
fi
node server.js