CUB-125: Sync .env.example with dev
Some checks failed
Dev Build & Deploy / test-and-build (pull_request) Failing after 0s
Dev Build & Deploy / docker-build-push (pull_request) Has been skipped

This commit is contained in:
2026-05-20 12:34:53 -04:00
parent 5356229312
commit c885e1e3ab

View File

@@ -1,33 +1,50 @@
# ============================================================================= # Control Center - Environment Variables
# Control Center — Environment Configuration Template # ======================================
# =============================================================================
# Copy this file to `.env` and fill in real values.
# Never commit `.env` — it is in .gitignore by default.
# =============================================================================
# ── Database ──────────────────────────────────────────────────────────────── # ── Backend Variables ───────────────────────────────────────────────────
POSTGRES_DB=controlcenter # Server configuration
POSTGRES_USER=controlcenter PORT=8080
POSTGRES_PASSWORD=changeme CORS_ORIGIN=http://localhost:3000
POSTGRES_PORT=5432
# ── Backend ───────────────────────────────────────────────────────────────────
BACKEND_PORT=8080
LOG_LEVEL=info LOG_LEVEL=info
ENVIRONMENT=development ENVIRONMENT=development
# ── Frontend ──────────────────────────────────────────────────────────────── # Database connection (PostgreSQL DSN)
FRONTEND_PORT=3000 # Format: postgresql://user:password@host:port/database?sslmode=disable
DATABASE_URL=postgresql://controlcenter:controlcenter@localhost:5432/controlcenter?sslmode=disable
# ── CORS ──────────────────────────────────────────────────────────────────── # Gateway (OpenClaw) connection
# Comma-separated allowed origins. Use "*" for local dev. # WebSocket gateway config (primary path)
CORS_ORIGIN=http://localhost:3000 WS_GATEWAY_URL=ws://host.docker.internal:18789/
# Gateway auth token — same as OPENCLAW_GATEWAY_TOKEN (set in environment)
GATEWAY_TOKEN=
# ── OpenClaw Gateway ────────────────────────────────────────────────────────── # REST poller config (fallback, only used if WS fails to connect)
# URL to the OpenClaw gateway agent status endpoint.
# In Docker Compose, use the container name or host.docker.internal for the
# gateway running outside Compose.
GATEWAY_URL=http://host.docker.internal:18789/api/agents GATEWAY_URL=http://host.docker.internal:18789/api/agents
# Polling interval for agent state updates (fallback only)
# How often to poll the gateway for agent state updates.
GATEWAY_POLL_INTERVAL=5s GATEWAY_POLL_INTERVAL=5s
# ── 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