From 95c11cb7d706e1af3dcd15ab57cf92fd7ef8aff5 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Tue, 8 Sep 2026 01:27:04 +0200 Subject: [PATCH] chore: remove PostHog analytics PR #10 made `POSTHOG_PROJECT_API_KEY` optional; this removes it entirely. The published `graphql-api` image no longer reads it (the `/events` proxy is gone), the frontend has no PostHog client, so the stack has nothing to configure. Drops the variable from `.env`, both compose files and the API service environment, plus the README and CLAUDE.md references. Verified: `docker compose config --quiet` passes for the prod and dev overlays; `git diff --check` clean. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_014WnrRvhmHcMPj6iwJ2NnzK --- .env | 1 - CLAUDE.md | 2 -- README.md | 6 +++--- compose.prod.yml | 1 - compose.yml | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.env b/.env index b09c74d..18220cf 100644 --- a/.env +++ b/.env @@ -23,4 +23,3 @@ MINIO_ACCESS_KEY=api-blob-download MINIO_SECRET_KEY=oswatcher-local-api TRAEFIK_VERSION=3.6.2 -POSTHOG_PROJECT_API_KEY="" diff --git a/CLAUDE.md b/CLAUDE.md index a09967e..ec4ccb0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -97,7 +97,6 @@ Key environment variables: - `DOMAIN` - Base domain for production Traefik routing (`api.`, `storage.`) - `NEO4J_AUTH` - Set to `none` in dev/test, use credentials in prod - `MINIO_ROOT_USER/PASSWORD` - MinIO admin credentials (local defaults are committed; change for a server) -- `POSTHOG_PROJECT_API_KEY` - Analytics key (optional) - `RESTRICTED_BRANCH_NAME` - Branch restriction in API (e.g., "windows", "master") - `NEO4J_GRAPHQL_DEBUG_LVL` - GraphQL debug level (dev only) @@ -149,7 +148,6 @@ Key environment variables: ### Production Requirements - `MINIO_ROOT_PASSWORD` must be set (default password is rejected) -- `POSTHOG_PROJECT_API_KEY` is optional; empty disables analytics - `DOMAIN` must be set (used for ``, `api.`, `storage.` Traefik routing) - Uses pre-built images from `ghcr.io/oswatcher/graphql-api:latest` and `ghcr.io/oswatcher/oswatcher-procedures:latest` - Frontend uses `ghcr.io/oswatcher/frontend:latest`; its entrypoint sets `VITE_OSWATCHER_API_URI` to `://api.` at container start (HTTPS if unset) diff --git a/README.md b/README.md index 6965700..c24ba6d 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ docker compose up -d The committed `.env` selects `compose.yml` and `compose.prod.yml`. It defaults to HTTP on localhost, loopback-only published ports and modest -Neo4j memory settings. No domain registration, TLS certificate or analytics key is needed. +Neo4j memory settings. No domain registration or TLS certificate is needed. Open ****. Other endpoints: @@ -97,7 +97,7 @@ docker compose -f compose.yml -f compose.dev.yml up -d --build build context until an overlay supplies one. The template selects the production overlay by default. The explicit `-f` flags above override that selection for development. -Development mode needs no registry credentials, no domain and no PostHog key, which makes +Development mode needs no registry credentials and no domain, which makes it suitable for developing the services. Use the quickstart above to evaluate the published images. - Frontend: @@ -129,7 +129,7 @@ Configure Neo4j authentication and size its heap/page cache for your corpus. `BI applies to all published service ports, including the database and storage; restrict those ports through your firewall when exposing the proxy publicly. -The MinIO root password must be non-default. PostHog analytics is optional. +The MinIO root password must be non-default. For existing deployments without `HTTP_SCHEME` or memory overrides, HTTPS routing and the previous server memory defaults are retained. diff --git a/compose.prod.yml b/compose.prod.yml index 64c3c18..0c141a8 100644 --- a/compose.prod.yml +++ b/compose.prod.yml @@ -52,7 +52,6 @@ services: pull_policy: always environment: - NODE_ENV=production - - POSTHOG_PROJECT_API_KEY=${POSTHOG_PROJECT_API_KEY:-} restart: unless-stopped labels: - "traefik.enable=true" diff --git a/compose.yml b/compose.yml index 435e8fe..1ed6828 100644 --- a/compose.yml +++ b/compose.yml @@ -81,7 +81,6 @@ services: NEO4J_URI: "bolt://neo4j:7687" OBJECT_STORAGE_URI: "http://minio:9000" RESTRICTED_BRANCH_NAME: ${RESTRICTED_BRANCH_NAME:-} - POSTHOG_PROJECT_API_KEY: ${POSTHOG_PROJECT_API_KEY} MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:?MINIO_ACCESS_KEY must be set} MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:?MINIO_SECRET_KEY must be set} labels: