CUB-126: Update Control Center deployment for Go + React
All checks were successful
Dev Build / build-test (pull_request) Successful in 1m33s
All checks were successful
Dev Build / build-test (pull_request) Successful in 1m33s
- Updated docker-compose.yml for Go + React + PostgreSQL - Go backend multi-stage Dockerfile (already existed) - React frontend multi-stage Dockerfile with nginx SPA config (already existed) - Kiosk start script and systemd unit - Deployment README - .env.example for environment variables
This commit is contained in:
45
.env.example
Normal file
45
.env.example
Normal file
@@ -0,0 +1,45 @@
|
||||
# Control Center - Environment Variables
|
||||
# ======================================
|
||||
|
||||
# ── Backend Variables ───────────────────────────────────────────────────
|
||||
# Server configuration
|
||||
PORT=8080
|
||||
CORS_ORIGIN=http://localhost:3000
|
||||
LOG_LEVEL=info
|
||||
ENVIRONMENT=development
|
||||
|
||||
# Database connection (PostgreSQL DSN)
|
||||
# Format: postgresql://user:password@host:port/database?sslmode=disable
|
||||
DATABASE_URL=postgresql://controlcenter:controlcenter@localhost:5432/controlcenter?sslmode=disable
|
||||
|
||||
# Gateway (OpenClaw) connection
|
||||
# URL to the OpenClaw gateway API for polling agent states
|
||||
GATEWAY_URL=http://localhost:18789/api/agents
|
||||
# Polling interval for agent state updates
|
||||
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
|
||||
Reference in New Issue
Block a user