diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7fedb10a..eeec4bd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -498,6 +498,7 @@ jobs: --build-arg="NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${{ secrets.CLOUD_PROD_CLERK_PUBLISHABLE_KEY }}" \ --build-arg="NEXT_PUBLIC_HYPERDX_API_KEY=${{ secrets.CLOUD_PROD_HYPERDX_API_KEY }}" \ --build-arg="NEXT_PUBLIC_POSTHOG_KEY=${{ secrets.CLOUD_PROD_POSTHOG_KEY }}" \ + --build-arg="NEXT_PUBLIC_CRISP_WEBSITE_ID=${{ secrets.CLOUD_PROD_CRISP_WEBSITE_ID }}" \ -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest ./ build-control-plane-image: diff --git a/app/Dockerfile b/app/Dockerfile index 7d5deabb..2b11fde7 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -30,6 +30,10 @@ ARG NEXT_PUBLIC_POSTHOG_KEY ENV NEXT_PUBLIC_POSTHOG_KEY=$NEXT_PUBLIC_POSTHOG_KEY ENV NEXT_PUBLIC_POSTHOG_HOST="https://www.inferable.ai/ingest" +ARG NEXT_PUBLIC_CRISP_WEBSITE_ID +ENV NEXT_PUBLIC_CRISP_WEBSITE_ID=$NEXT_PUBLIC_CRISP_WEBSITE_ID + + RUN npm run build RUN npm prune --omit=dev diff --git a/app/components/crisp-chat.tsx b/app/components/crisp-chat.tsx index 572d8ed4..ed412c09 100644 --- a/app/components/crisp-chat.tsx +++ b/app/components/crisp-chat.tsx @@ -5,7 +5,7 @@ import { Crisp } from "crisp-sdk-web"; const CrispChat = () => { useEffect(() => { - Crisp.configure("9ea8a5a6-1032-49eb-aee0-81af37053f65"); + process.env.NEXT_PUBLIC_CRISP_WEBSITE_ID && Crisp.configure(process.env.NEXT_PUBLIC_CRISP_WEBSITE_ID); }, []); return null;