2026-05-20 12:34:53 -04:00
|
|
|
# Control Center - Environment Variables
|
|
|
|
|
# ======================================
|
2026-05-10 08:21:33 -04:00
|
|
|
|
2026-05-20 12:34:53 -04:00
|
|
|
# ── Backend Variables ───────────────────────────────────────────────────
|
|
|
|
|
# Server configuration
|
|
|
|
|
PORT=8080
|
|
|
|
|
CORS_ORIGIN=http://localhost:3000
|
2026-05-10 08:21:33 -04:00
|
|
|
LOG_LEVEL=info
|
|
|
|
|
ENVIRONMENT=development
|
|
|
|
|
|
2026-05-20 12:34:53 -04:00
|
|
|
# Database connection (PostgreSQL DSN)
|
|
|
|
|
# Format: postgresql://user:password@host:port/database?sslmode=disable
|
|
|
|
|
DATABASE_URL=postgresql://controlcenter:controlcenter@localhost:5432/controlcenter?sslmode=disable
|
2026-05-10 08:21:33 -04:00
|
|
|
|
2026-05-20 12:34:53 -04:00
|
|
|
# Gateway (OpenClaw) connection
|
|
|
|
|
# WebSocket gateway config (primary path)
|
|
|
|
|
WS_GATEWAY_URL=ws://host.docker.internal:18789/
|
|
|
|
|
# Gateway auth token — same as OPENCLAW_GATEWAY_TOKEN (set in environment)
|
|
|
|
|
GATEWAY_TOKEN=
|
2026-05-10 08:21:33 -04:00
|
|
|
|
2026-05-20 12:34:53 -04:00
|
|
|
# REST poller config (fallback, only used if WS fails to connect)
|
2026-05-10 08:21:33 -04:00
|
|
|
GATEWAY_URL=http://host.docker.internal:18789/api/agents
|
2026-05-20 12:34:53 -04:00
|
|
|
# Polling interval for agent state updates (fallback only)
|
2026-05-10 08:21:33 -04:00
|
|
|
GATEWAY_POLL_INTERVAL=5s
|
2026-05-20 12:34:53 -04:00
|
|
|
|
|
|
|
|
# ── Frontend Variables (via Vite) ───────────────────────────────────────
|
|
|
|
|
# The Vite config exposes these as import.meta.env.VITE_*
|
|
|
|
|
# Set via environment variable when building: VITE_API_URL
|
|
|
|
|
# VITE_API_URL=http://localhost:8080
|
|
|
|
|
|
|
|
|
|
# ── Docker Compose Specific ─────────────────────────────────────────────
|
|
|
|
|
# When using docker-compose, these are set in the services section
|
|
|
|
|
# See docker-compose.yml for service-specific environment variables
|
|
|
|
|
|
|
|
|
|
# ── Database Configuration ─────────────────────────────────────────────
|
|
|
|
|
# Set in the db service environment section of docker-compose.yml
|
|
|
|
|
# POSTGRES_USER=controlcenter
|
|
|
|
|
# POSTGRES_PASSWORD=controlcenter
|
|
|
|
|
# POSTGRES_DB=controlcenter
|
|
|
|
|
|
|
|
|
|
# ── Development Notes ───────────────────────────────────────────────────
|
|
|
|
|
# For local development without Docker:
|
|
|
|
|
# 1. Start PostgreSQL locally
|
|
|
|
|
# 2. Run: go run ./cmd/server/main.go
|
|
|
|
|
# 3. Run: npm run dev in frontend/
|
|
|
|
|
#
|
|
|
|
|
# For Docker deployment:
|
|
|
|
|
# 1. Copy .env.example to .env (backend only)
|
|
|
|
|
# 2. Run: docker compose up -d
|
|
|
|
|
# 3. Access frontend at http://localhost:3000
|