Push telemetry to Posthog to grok Khoj usage

This commit is contained in:
Debanjum Singh Solanky
2023-06-05 13:19:27 +05:30
parent d13db2e666
commit 8617cf1389
4 changed files with 17 additions and 4 deletions

View File

@@ -6,5 +6,10 @@ LABEL org.opencontainers.image.source https://github.com/debanjum/khoj
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Set Environment Variables
RUN --mount=type=secret,id=POSTHOG_API_KEY \
export POSTHOG_API_KEY=$(cat /run/secrets/POSTHOG_API_KEY) && \
echo "POSTHOG_API_KEY=$POSTHOG_API_KEY" > /app/.env
# Copy Application
COPY telemetry.py /app/main.py