Containerize the monitor with production and dev compose stacks, fix healthchecks and port handling, and make the dashboard base path configurable for direct or proxied access. Co-authored-by: Cursor <cursoragent@cursor.com>
82 lines
3.9 KiB
Text
82 lines
3.9 KiB
Text
# =============================================================================
|
|
# wxcc-monitor Environment Configuration
|
|
#
|
|
# Copy this file and rename it (examples below) then fill in real values.
|
|
#
|
|
# Recommended usage with Docker:
|
|
# - Development (native or dev container): cp .env.example .env
|
|
# - Production container: cp .env.example .env.prod
|
|
#
|
|
# Then run:
|
|
# Native dev: npm run dev
|
|
# Prod container: docker compose -f docker-compose.yml --env-file .env.prod up -d
|
|
# Dev container test: docker compose -f docker-compose.dev.yml --env-file .env up
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Server
|
|
# -----------------------------------------------------------------------------
|
|
# Native dev: use your preferred host port (e.g. 1912).
|
|
# Docker: docker-compose.yml overrides this to 3000 inside the container.
|
|
PORT=3000
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Dashboard base path
|
|
# -----------------------------------------------------------------------------
|
|
# Leave empty for direct access (e.g. http://127.0.0.1:1912).
|
|
# Set to /test when the dashboard is served behind a reverse proxy that adds that prefix.
|
|
BASE_PATH=
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# WebSocket Authentication (used by the dashboard)
|
|
# -----------------------------------------------------------------------------
|
|
WS_AUTH_TOKEN=your-super-secret-ws-token-here
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Webex Contact Center / Integration OAuth Credentials
|
|
# -----------------------------------------------------------------------------
|
|
WXCC_ORG_ID=your-org-id
|
|
WEBEX_CLIENT_ID=your-client-id
|
|
WEBEX_CLIENT_SECRET=your-client-secret
|
|
WEBEX_INTEGRATION_USER_ID=your-integration-user-id
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Webex Alerting (for long break / long call threshold alerts)
|
|
# -----------------------------------------------------------------------------
|
|
# Get this from https://web.webex.com or the /rooms API
|
|
WEBEX_ALERT_ROOM_ID=Y2lzY29zcGFyazovL3VzL1JPT00v...
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Webhook Configuration (CRITICAL FOR AGENT STATE CHANGES)
|
|
# -----------------------------------------------------------------------------
|
|
# The public URL that WxCC will POST to when agent state changes.
|
|
# This MUST be reachable from the internet and must eventually reach this app.
|
|
#
|
|
# When running in Docker:
|
|
# - This URL should point at your reverse proxy / load balancer.
|
|
# - Your reverse proxy then forwards to the container (usually port 3000 inside).
|
|
# - Do NOT point it directly at a Docker Desktop port on your laptop.
|
|
#
|
|
# Example: https://wxcc-monitor.yourcompany.com/webhook
|
|
WXCC_WEBHOOK_URL=
|
|
|
|
# Shared secret that must be present on every inbound webhook
|
|
# (header: x-wxcc-webhook-secret). Generate with: openssl rand -hex 32
|
|
WXCC_WEBHOOK_SECRET=your-strong-random-webhook-secret
|
|
|
|
# =============================================================================
|
|
# Docker-Specific Notes
|
|
# =============================================================================
|
|
#
|
|
# 1. data/ and logs/ must be bind-mounted when running containers (see compose files).
|
|
# The app writes many files here (tokens, agentStates, active alerts, etc.).
|
|
#
|
|
# 2. The container serves the application at the root path (/).
|
|
# Any "/test" prefix you see in the dashboard HTML is added by your
|
|
# external reverse proxy. This is the intended deployment model.
|
|
#
|
|
# 3. WEBHOOK_URL is the most common source of problems in Docker setups.
|
|
# It must be publicly reachable and correctly routed to the container.
|
|
#
|
|
# 4. Never commit real .env, .env.prod, or .env.dev files.
|
|
# =============================================================================
|