mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(analytics): build-time bake + telemetry depth (#336)
Bake PostHog + Sentry into the published Docker image (SNAPOTTER_ANALYTICS build arg, codegen script). Delete entire consent system. Move event emission to BullMQ worker. Add cross-tier identity stitching, Sentry performance tracing on both tiers, frontend funnel events. Fix stateful regex bug. 86 files changed, 1593 insertions(+), 3747 deletions(-)
This commit is contained in:
@@ -59,6 +59,13 @@ COPY packages/shared/src ./packages/shared/src
|
||||
COPY apps/web/src ./apps/web/src
|
||||
COPY apps/web/public ./apps/web/public
|
||||
|
||||
# Bake analytics config into the shared package before building the frontend.
|
||||
# The published image ships with analytics ON; self-builders can override:
|
||||
# docker compose build --build-arg SNAPOTTER_ANALYTICS=off
|
||||
ARG SNAPOTTER_ANALYTICS=on
|
||||
COPY scripts/bake-analytics.mjs ./scripts/
|
||||
RUN node scripts/bake-analytics.mjs ${SNAPOTTER_ANALYTICS}
|
||||
|
||||
# Build only the web frontend (API runs from TS source via tsx)
|
||||
RUN --mount=type=cache,id=turbo-cache,target=/app/.turbo \
|
||||
pnpm --filter @snapotter/web build
|
||||
|
||||
@@ -10,6 +10,8 @@ services:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
args:
|
||||
SNAPOTTER_ANALYTICS: "on"
|
||||
image: snapotter/snapotter:latest
|
||||
container_name: SnapOtter
|
||||
ports:
|
||||
|
||||
@@ -9,6 +9,8 @@ services:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
args:
|
||||
SNAPOTTER_ANALYTICS: "on"
|
||||
image: snapotter/snapotter:latest
|
||||
container_name: SnapOtter
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user