|
| 1 | +# ============================================================================== |
| 2 | +# GitHub Copilot Metrics Viewer Configuration |
| 3 | +# ============================================================================== |
| 4 | + |
| 5 | +# ------------------------------------------------------------------------------ |
| 6 | +# Core Configuration |
| 7 | +# ------------------------------------------------------------------------------ |
| 8 | + |
| 9 | +# Determines if mocked data should be used instead of making API calls. |
| 10 | +NUXT_PUBLIC_IS_DATA_MOCKED=true |
| 11 | + |
| 12 | +# Determines the scope of the API calls. |
| 13 | +# Can be 'enterprise', 'organization', 'team-organization', or 'team-enterprise' |
| 14 | +NUXT_PUBLIC_SCOPE=organization |
| 15 | + |
| 16 | +# Determines the enterprise or organization name to target API calls. |
| 17 | +NUXT_PUBLIC_GITHUB_ORG=octodemo |
| 18 | +NUXT_PUBLIC_GITHUB_ENT= |
| 19 | + |
| 20 | +# Determines the team name if exists to target API calls. |
| 21 | +NUXT_PUBLIC_GITHUB_TEAM= |
| 22 | + |
| 23 | +# Enable GitHub OAuth authentication |
| 24 | +NUXT_PUBLIC_USING_GITHUB_AUTH=false |
| 25 | + |
| 26 | +# ------------------------------------------------------------------------------ |
| 27 | +# Authentication |
| 28 | +# ------------------------------------------------------------------------------ |
| 29 | + |
| 30 | +# GitHub Personal Access Token for API calls |
| 31 | +# Required scopes: copilot, manage_billing:copilot, manage_billing:enterprise, read:enterprise, read:org |
| 32 | +# NUXT_GITHUB_TOKEN=ghp_your_token_here |
| 33 | + |
| 34 | +# Session password for encrypting user sessions (REQUIRED!) |
| 35 | +# Must be at least 32 characters long |
| 36 | +NUXT_SESSION_PASSWORD=something_long_and_random_thats_at_least_32_characters |
| 37 | + |
| 38 | +# GitHub OAuth App credentials (if using GitHub auth) |
| 39 | +NUXT_OAUTH_GITHUB_CLIENT_ID= |
| 40 | +NUXT_OAUTH_GITHUB_CLIENT_SECRET= |
| 41 | + |
| 42 | +# ------------------------------------------------------------------------------ |
| 43 | +# API Migration Configuration (New Features) |
| 44 | +# ------------------------------------------------------------------------------ |
| 45 | + |
| 46 | +# Use the LEGACY Copilot Metrics API (deprecated, shuts down April 2, 2026) |
| 47 | +# Default is false — the new download-based API is used unless this is explicitly set to true. |
| 48 | +# Only set USE_LEGACY_API=true if you have a specific reason to use the old /copilot/metrics endpoint. |
| 49 | +USE_LEGACY_API=false |
| 50 | + |
| 51 | +# Enable storage-backed historical mode |
| 52 | +# Set to 'true' to query storage for date ranges instead of live API calls |
| 53 | +# Requires storage backend configuration (see below) |
| 54 | +NUXT_PUBLIC_ENABLE_HISTORICAL_MODE=false |
| 55 | + |
| 56 | +# ------------------------------------------------------------------------------ |
| 57 | +# Storage Configuration |
| 58 | +# ------------------------------------------------------------------------------ |
| 59 | + |
| 60 | +# Storage backend for metrics data |
| 61 | +# Options: filesystem (dev), postgresql (prod), redis, mongodb |
| 62 | +# Configured in nuxt.config.ts nitro.storage section |
| 63 | + |
| 64 | +# For PostgreSQL backend (recommended for production): |
| 65 | +# DATABASE_URL=postgresql://user:password@localhost:5432/copilot_metrics |
| 66 | + |
| 67 | +# For Redis backend: |
| 68 | +# REDIS_URL=redis://localhost:6379 |
| 69 | + |
| 70 | +# For filesystem backend (default, development only): |
| 71 | +# Data stored in ./.data/metrics directory (already configured) |
| 72 | + |
| 73 | +# ------------------------------------------------------------------------------ |
| 74 | +# Data Sync Configuration |
| 75 | +# ------------------------------------------------------------------------------ |
| 76 | + |
| 77 | +# Enable automatic daily sync (for background scheduler) |
| 78 | +# Set to 'true' to enable the scheduled task |
| 79 | +SYNC_ENABLED=false |
| 80 | + |
| 81 | +# Cron schedule for sync job (default: 2 AM daily) |
| 82 | +# Format: minute hour day month weekday |
| 83 | +SYNC_SCHEDULE=0 2 * * * |
| 84 | + |
| 85 | +# Number of days to backfill on first sync |
| 86 | +SYNC_BACKFILL_DAYS=28 |
| 87 | + |
| 88 | +# Data retention period (days) |
| 89 | +SYNC_RETENTION_DAYS=365 |
| 90 | + |
| 91 | +# ------------------------------------------------------------------------------ |
| 92 | +# Network Configuration |
| 93 | +# ------------------------------------------------------------------------------ |
| 94 | + |
| 95 | +# HTTP Proxy (for corporate environments) |
| 96 | +# HTTP_PROXY=http://proxy.company.com:8080 |
| 97 | + |
| 98 | +# Custom CA certificate path (for corporate proxies with custom CA) |
| 99 | +# CUSTOM_CA_PATH=/path/to/ca-cert.pem |
| 100 | + |
| 101 | +# Server port (default: 80 in Docker, 3000 in dev) |
| 102 | +# NITRO_PORT=3000 |
| 103 | + |
| 104 | +# ------------------------------------------------------------------------------ |
| 105 | +# Admin API Configuration |
| 106 | +# ------------------------------------------------------------------------------ |
| 107 | + |
| 108 | +# ⚠️ SECURITY WARNING: Admin endpoints are NOT authenticated by default! |
| 109 | +# |
| 110 | +# The /api/admin/* endpoints (sync trigger, status) are currently UNPROTECTED. |
| 111 | +# If you expose these endpoints publicly, you MUST secure them via: |
| 112 | +# - Reverse proxy authentication (nginx, Apache, etc.) |
| 113 | +# - API gateway with auth (AWS API Gateway, Azure APIM, etc.) |
| 114 | +# - Firewall rules restricting to internal networks only |
| 115 | +# - VPN or private network access only |
| 116 | +# |
| 117 | +# ADMIN_API_SECRET is reserved for future native authentication but has NO EFFECT |
| 118 | +# in the current version. Do NOT rely on this variable for security. |
| 119 | +# ADMIN_API_SECRET=your_secure_random_secret_here |
| 120 | + |
| 121 | +# ============================================================================== |
| 122 | +# Migration Notes |
| 123 | +# ============================================================================== |
| 124 | + |
| 125 | +# The legacy GitHub Copilot Metrics API will shut down on April 2, 2026. |
| 126 | +# This application uses the new download-based API by default. No configuration needed. |
| 127 | +# |
| 128 | +# API modes: |
| 129 | +# Default (new API) — download-based reports, richer data, model/feature breakdowns |
| 130 | +# Legacy (opt-in) — set USE_LEGACY_API=true to use deprecated /copilot/metrics |
| 131 | +# |
| 132 | +# Recommended setup: |
| 133 | +# 1. Test with mock data (IS_DATA_MOCKED=true) |
| 134 | +# 2. Set real GitHub token (NUXT_GITHUB_TOKEN) |
| 135 | +# 3. Configure PostgreSQL + enable historical mode (ENABLE_HISTORICAL_MODE=true) |
| 136 | +# 4. Enable sync (SYNC_ENABLED=true) |
| 137 | +# |
| 138 | +# See MIGRATION_GUIDE.md for full details |
| 139 | +# ============================================================================== |
0 commit comments