Wire world's telemetry to the live Hanzo observability services, all env-gated
from KMS (no-op until IDs provisioned — ships inert, activates on config):
- Sentry: VITE_SENTRY_DSN build-secret → errors to sentry.hanzo.ai.
- Analytics: bootstrap/analytics.ts injects the analytics.hanzo.ai (Umami) script
on VITE_ANALYTICS_WEBSITE_ID; track() forwards custom product events (→
/v1/insights/events + AnalyticsPanel pageviews). track('variant_view') wired.
- GTM-ready: initGtm() loads one Google Tag Manager container (VITE_GTM_ID) that
manages GA / Facebook / LinkedIn / X tags from GTM's UI; CSP script-src allows
googletagmanager/google-analytics/facebook/linkedin/x.
- Naming: CloudAnalyticsPanel → AnalyticsPanel, org-analytics.ts → analytics.ts.
OpenGraph/Twitter/JSON-LD SEO already comprehensive.
Claude-Session: https://claude.ai/code/session_01NP4ehjWW2h98FkE4YjUKuJ
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
# Canonical CI/CD config for hanzoai/world — read by both the hanzoai/ci
|
|
# reusable workflow (.github/workflows/cicd.yml) and platform.hanzo.ai.
|
|
# One image (the Vite SPA served by hanzoai/static), and a main-branch rollout
|
|
# onto the existing `world` operator Service CR
|
|
# (universe: infra/k8s/operator/crs/world.yaml).
|
|
#
|
|
# No separate `test:` block: the Dockerfile IS the gate — `npm ci && npm run
|
|
# build` fails the image on any type error or build break, so nothing broken
|
|
# ships (same pattern as hanzoai/finance + hanzoai/console).
|
|
|
|
images:
|
|
- name: world
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
repo: ghcr.io/hanzoai/world
|
|
# Publishable Mapbox token (pk, URL-restricted to world.hanzo.ai) baked into
|
|
# the Vite SPA at build so the Satellite/Terrain basemaps load (Dark stays
|
|
# keyless CartoDB). Sourced from KMS (hanzo/deploy/VITE_MAPBOX_TOKEN,
|
|
# env=prod) by hanzoai/ci — the key name IS the build-arg. Never in git.
|
|
build_secrets:
|
|
- VITE_MAPBOX_TOKEN
|
|
- VITE_SENTRY_DSN
|
|
- VITE_ANALYTICS_WEBSITE_ID
|
|
- VITE_GTM_ID
|
|
|
|
# Deploy: roll the freshly-built image onto the `world` Service CR. Fires only
|
|
# on `main` (+ tags); PRs and forks build but never deploy. KMS hands back the
|
|
# kubeconfig at run time.
|
|
deploy:
|
|
cluster: do-sfo3-hanzo-k8s
|
|
namespace: hanzo
|
|
# Quoted to dodge YAML 1.1 boolean coercion of a bare `on:` key.
|
|
"on": [main]
|
|
services:
|
|
- name: world
|
|
image: world
|
|
|
|
# KMS (kms.hanzo.ai, Universal Auth) supplies the GHCR push token and the
|
|
# target kubeconfig at run time. Only KMS_CLIENT_ID/KMS_CLIENT_SECRET live in
|
|
# GitHub; everything else is fetched here.
|
|
kms:
|
|
path: /deploy
|
|
environment: prod
|