# Service endpoints (all required, no defaults)
services:
  controlTower:
    protocol: http
    host: localhost
    port: 19001

  interceptor:
    port: 80

  testAgent:
    port: 80

  chromium:
    port: 9222

# Cluster watcher poll intervals (in-process module inside Control Tower)
clusterWatcher:
  idlePollIntervalMs: 1000
  activePollIntervalMs: 1000

# Frontend configuration
frontend:
  vite:
    protocol: http
    host: localhost
    port: 5173

# Concurrency limits
concurrency:
  maxConcurrentTests: 6
  maxBootingTests: 2

# Network configuration
network:
  dns:
    nameserver: 127.0.0.1
  proxy:
    noProxy: localhost,127.0.0.1

browser:
  defaultViewportWidth: 1280
  defaultViewportHeight: 720

# Circuit breaker (milliseconds)
circuitBreaker:
  timeout: 10000
  errorThresholdPercentage: 75
  resetTimeout: 30000

# Timeouts (milliseconds)
timeouts:
  httpRequest: 30000
  metricsInterval: 10000

# Database defaults (for namespace agent)
# These are intentionally weak — they apply only to ephemeral databases
# inside isolated Docker environments that are destroyed after each test run.
database:
  defaultUser: dokkimi
  defaultPassword: dokkimi
  defaultName: dokkimi
  # Dokkimi app database URL (SQLite for local, override with DATABASE_URL for cloud)
  url: file:~/.dokkimi/dokkimi.db

# Storage paths
storage:
  dir: ~/.dokkimi/storage
  initFilesDir: ~/.dokkimi/init-files

# Logging configuration
logging:
  format: json
  level: info
  actions: true

# Telemetry (anonymous usage analytics via PostHog)
# The API key is injected at publish time. To test telemetry locally,
# add your own PostHog key here or set DOKKIMI_POSTHOG_API_KEY.
# Set enabled: false or run `dokkimi config` to opt out.
telemetry:
  posthogApiKey: phc_qRHhgna4UJzsZ47Vr3yf4aRQ4mSD9ykqyN5kDtoigSJp
  posthogHost: https://us.i.posthog.com

# Default images (used when the user doesn't specify a version)
images:
  databases:
    postgres: 'postgres:15'
    mysql: 'mysql:8'
    mongodb: 'mongo:7'
    redis: 'redis:7-alpine'
  brokers:
    amqp: 'rabbitmq:3'
    kafka: 'apache/kafka:4.3.1'

# API Keys (for service-to-service authentication)
apiKeys: {}

# CORS configuration
cors:
  origins:
    - http://localhost:5173
    - http://localhost:3000
  allowAnyLocalhost: true
