skillhub/docs/examples/analytics/compose.yaml
小妍儿 ✨ 6952629eed
feat(web): add passive semantic analytics attributes across frontend workflows (#1010)
* feat(web): expose passive semantic analytics attributes

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* fix(web): omit disabled non-native analytics intents

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* fix(web): keep docs integration test outside production build inputs

Move the collector example test alongside existing root-level web tests so the web-only Docker context does not require repository documentation. Preserve all assertions and default Vitest discovery; document the boundary.

Verified 1217 tests, focused 12 tests, typecheck, lint, build and a fresh web-only build without repository docs. Original snapshot reproduced TS2307. Independent review passed. Full local image build was blocked by an uncached pnpm download with network disabled; remote image CI remains authoritative.

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* docs(analytics): configure intent rules and add a manual Umami demo

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* fix(analytics): accept product IDs and preserve concurrent intents

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* fix(analytics): guard consent at Umami dispatch boundary

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* fix(analytics): snapshot validated Umami payload primitives

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* docs(analytics): define configurable opt-in integration

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* chore(analytics): refresh manifest line numbers after main merge

The merge of latest main shifted source lines in router and pages. Only
line numbers change; routes, IDs and sites are identical.

Refs #989

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* fix(analytics): preserve release Web defaults in optional edge

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* docs(analytics): add Chinese guide and split delivery scope

Refs #989

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

* docs(analytics): keep upstream override and bypass module cache in guide

Export the upstream override so later compose commands keep it, and
tell operators to bypass the immutable module cache when re-checking
an edited local entry.

Refs #989

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>

---------

Signed-off-by: 千乘妍 (Xiaoyaner) <258399167+xiaoyaner0201@users.noreply.github.com>
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Co-authored-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-10-29 14:56:58 +08:00

40 lines
1.6 KiB
YAML

# LOCAL DEMO ONLY. Umami starts with admin / umami: change it immediately.
# The DB password and app secret below are public demo values, NOT production secrets.
# SkillHub is an existing upstream, not built or configured by this demo.
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: demo-only-change-me
healthcheck:
test: [CMD-SHELL, pg_isready -U umami -d umami]
interval: 5s
timeout: 3s
retries: 20
umami:
image: ghcr.io/umami-software/umami:3.4.1
environment:
DATABASE_URL: postgresql://umami:demo-only-change-me@postgres:5432/umami
APP_SECRET: demo-only-change-this-before-use
depends_on:
postgres:
condition: service_healthy
# Direct admin access is LOCAL setup only; never proxy the admin through edge.
ports: ["127.0.0.1:8300:3000"]
edge:
image: nginx:1.30.6-alpine
# Docker Desktop/OrbStack provide this name; native Linux needs this mapping.
extra_hosts: ["host.docker.internal:host-gateway"]
environment:
SKILLHUB_WEB_UPSTREAM: ${SKILLHUB_WEB_UPSTREAM:-host.docker.internal:80}
UMAMI_UPSTREAM: umami:3000
NGINX_ENVSUBST_FILTER: ^(SKILLHUB_WEB_UPSTREAM|UMAMI_UPSTREAM)$$
volumes:
- ./nginx.conf:/etc/nginx/templates/default.conf.template:ro
- ./observe/v1/observer.mjs:/srv/_skillhub-observe/v1/observer.mjs:ro
- ./observe/v1/skillhub-intents.mjs:/srv/_skillhub-observe/v1/skillhub-intents.mjs:ro
- ./observe/v1/umami-adapter.mjs:/srv/_skillhub-observe/v1/umami-adapter.mjs:ro
ports: ["127.0.0.1:8081:8081"]
depends_on: [umami]