Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

UN-2236 [FEAT] Add build-time PostHog control for on-prem deployments (#1615)

Athulca78643ff8d2
diff --git a/docker/dockerfiles/frontend.Dockerfile b/docker/dockerfiles/frontend.Dockerfile
index 3c205ffcb..1a69660fc 100644
--- a/docker/dockerfiles/frontend.Dockerfile
+++ b/docker/dockerfiles/frontend.Dockerfile
@@ -23,7 +23,9 @@ CMD ["npm", "start"]
### FOR PRODUCTION ###
# Builder stage for production build
FROM base AS builder
+ARG REACT_APP_ENABLE_POSTHOG=true
ENV REACT_APP_BACKEND_URL=""
+ENV REACT_APP_ENABLE_POSTHOG=${REACT_APP_ENABLE_POSTHOG}
# Copy package files and install dependencies
COPY ${BUILD_CONTEXT_PATH}/package.json ${BUILD_CONTEXT_PATH}/package-lock.json ./
diff --git a/frontend/sample.env b/frontend/sample.env
index d7d8b7d67..8e09fca6c 100644
--- a/frontend/sample.env
+++ b/frontend/sample.env
@@ -1,5 +1,9 @@
REACT_APP_BACKEND_URL=http://localhost:8000
+# Analytics - PostHog (set to false to disable tracking)
+# Default: false for local development
+REACT_APP_ENABLE_POSTHOG=false
+
# For development
NODE_ENV=development
# Enable file watching via polling instead of filesystem events