feat(#374): add telemetry config to docker-compose and .env

- Add MOSAIC_TELEMETRY_* variables to .env.example with descriptions
- Pass telemetry env vars to api service in production compose
- Pass telemetry env vars to coordinator service in dev and swarm composes
- Swarm composes default to production URL (https://tel-api.mosaicstack.dev)
- Dev compose includes commented-out telemetry-api service placeholder
- All compose files default MOSAIC_TELEMETRY_ENABLED to false for safety

Refs #374

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 01:40:06 -06:00
parent 314dd24dce
commit 24c21f45b3
5 changed files with 85 additions and 0 deletions

View File

@@ -51,6 +51,12 @@ services:
LOG_LEVEL: ${LOG_LEVEL:-info}
HOST: 0.0.0.0
PORT: 8000
# Telemetry (task completion tracking & predictions)
MOSAIC_TELEMETRY_ENABLED: ${MOSAIC_TELEMETRY_ENABLED:-false}
MOSAIC_TELEMETRY_SERVER_URL: ${MOSAIC_TELEMETRY_SERVER_URL:-http://telemetry-api:8000}
MOSAIC_TELEMETRY_API_KEY: ${MOSAIC_TELEMETRY_API_KEY:-}
MOSAIC_TELEMETRY_INSTANCE_ID: ${MOSAIC_TELEMETRY_INSTANCE_ID:-}
MOSAIC_TELEMETRY_DRY_RUN: ${MOSAIC_TELEMETRY_DRY_RUN:-false}
ports:
- "8000:8000"
healthcheck:
@@ -122,6 +128,29 @@ services:
com.mosaic.service: "secrets-init"
com.mosaic.description: "OpenBao auto-initialization sidecar"
# ======================
# Telemetry API (Optional - for local development)
# ======================
# Uncomment to run the telemetry API locally for self-contained development.
# For production, use an external telemetry API URL instead.
# telemetry-api:
# image: git.mosaicstack.dev/mosaic/telemetry-api:latest
# container_name: mosaic-telemetry-api
# restart: unless-stopped
# environment:
# HOST: 0.0.0.0
# PORT: 8000
# ports:
# - "8001:8000"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 10s
# networks:
# - mosaic-network
volumes:
postgres_data:
name: mosaic-postgres-data