File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed
Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7+ - fix/posthog-build-args
78 tags :
89 - ' v*'
910
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ RUN curl -L -o /tmp/private-chat.tar.gz "https://github.com/nearai/private-chat/
4242 tar -xzf /tmp/private-chat.tar.gz --strip-components=1 && \
4343 rm /tmp/private-chat.tar.gz
4444
45+ # Set the PostHog key and host
46+ ARG POSTHOG_KEY
47+ ARG POSTHOG_HOST
48+ ENV VITE_PUBLIC_POSTHOG_KEY=${POSTHOG_KEY}
49+ ENV VITE_PUBLIC_POSTHOG_HOST=${POSTHOG_HOST}
50+
4551# Install pnpm with specific version
4652RUN npm install -g pnpm@10.10.0
4753
Original file line number Diff line number Diff line change 88# - "v1.2.3" (tag)
99# - "abc123def456" (commit hash)
1010private_chat_frontend_version = " 9bc941ab98b6d6ffcb60c4aefdaf9d66ceb664c7"
11+
12+ # PostHog key and host for the private-chat frontend
13+ posthog_key = " phc_glaMeuuO1gLFSB2U9y27MchidXEmSnFOQLB8cceyVSb"
14+ posthog_host = " https://us.i.posthog.com"
Original file line number Diff line number Diff line change @@ -33,17 +33,22 @@ git rev-parse HEAD > .GIT_REV
3333# Read private-chat frontend version from build-config.toml
3434if [ -f " build-config.toml" ]; then
3535 PRIVATE_CHAT_FRONTEND_VERSION=$( grep -E ' ^\s*private_chat_frontend_version\s*=' build-config.toml | awk -F' "' ' {print $2}' | head -n1)
36+ POSTHOG_KEY=$( grep -E ' ^\s*posthog_key\s*=' build-config.toml | awk -F' "' ' {print $2}' | head -n1)
37+ POSTHOG_HOST=$( grep -E ' ^\s*posthog_host\s*=' build-config.toml | awk -F' "' ' {print $2}' | head -n1)
3638fi
3739if [ -z " $PRIVATE_CHAT_FRONTEND_VERSION " ]; then
3840 echo " Error: private-chat frontend version not found in build-config.toml"
3941 exit 1
4042fi
4143echo " Using private-chat frontend version: ${PRIVATE_CHAT_FRONTEND_VERSION} "
44+ echo " Using PostHog key: ${POSTHOG_KEY} and host: ${POSTHOG_HOST} "
4245
4346TEMP_TAG=" private-chat-temp:$( date +%s) "
4447docker buildx build --builder buildkit_20 --no-cache --platform linux/amd64 \
4548 --build-arg SOURCE_DATE_EPOCH=" 0" \
4649 --build-arg PRIVATE_CHAT_FRONTEND_VERSION=" ${PRIVATE_CHAT_FRONTEND_VERSION} " \
50+ --build-arg POSTHOG_KEY=" ${POSTHOG_KEY} " \
51+ --build-arg POSTHOG_HOST=" ${POSTHOG_HOST} " \
4752 --output type=oci,dest=./oci.tar,rewrite-timestamp=true \
4853 --output type=docker,name=" $TEMP_TAG " ,rewrite-timestamp=true .
4954
You can’t perform that action at this time.
0 commit comments