Files
pulse/.env.example
T

107 lines
3.9 KiB
Bash

# Pulse Environment Configuration
# Copy this file to .env to configure your environment
# === Basic Configuration ===
# Set to 'production' for normal use or 'development' for testing
NODE_ENV=production
# Log level: 'error', 'warn', 'info', 'debug'
LOG_LEVEL=info
# Port for the application server
PORT=7654
# === Proxmox Configuration ===
# Replace with your Proxmox VE node details
# Node 1
PROXMOX_NODE_1_NAME=Proxmox Node 1
PROXMOX_NODE_1_HOST=https://proxmox.local:8006
PROXMOX_NODE_1_TOKEN_ID=root@pam!pulse
PROXMOX_NODE_1_TOKEN_SECRET=your-token-secret
# Node 2 (optional)
# PROXMOX_NODE_2_NAME=Proxmox Node 2
# PROXMOX_NODE_2_HOST=https://proxmox2.local:8006
# PROXMOX_NODE_2_TOKEN_ID=root@pam!pulse
# PROXMOX_NODE_2_TOKEN_SECRET=your-token-secret
# === SSL Configuration ===
# SECURITY WARNING:
# - For development or internal networks, you can set these to true/0
# - For production, set these to false/1 and ensure proper SSL certificates are installed
# - Setting these to true/0 disables SSL certificate validation and is not secure for production
IGNORE_SSL_ERRORS=true
NODE_TLS_REJECT_UNAUTHORIZED=0
# === Application Configuration ===
# How many minutes of metrics history to keep in memory
METRICS_HISTORY_MINUTES=30
# Polling intervals (in milliseconds)
NODE_POLLING_INTERVAL_MS=15000
EVENT_POLLING_INTERVAL_MS=5000
# API rate limiting settings
API_RATE_LIMIT_MS=2000
API_TIMEOUT_MS=90000
API_RETRY_DELAY_MS=10000
# Maximum realistic network rate in MB/s (default: 125 MB/s = 1 Gbps)
# Increase this value for faster networks:
# - 1250 for 10 Gbps networks
# - 3125 for 25 Gbps networks
# - 12500 for 100 Gbps networks
METRICS_MAX_REALISTIC_RATE=125
# Enable developer tools (set to true only for debugging production issues)
ENABLE_DEV_TOOLS=false
# === Performance Tuning ===
# Uncomment to enable events-only mode (reduces resource usage)
# This will only query for events without constantly fetching full resource stats
# EVENTS_ONLY_MODE=true
# === Cluster Configuration ===
# Pulse automatically detects if your Proxmox nodes are part of a cluster
# Set to 'false' to disable automatic cluster detection
# PROXMOX_AUTO_DETECT_CLUSTER=true
# Set to 'false' to disable cluster mode even if a cluster is detected
# PROXMOX_CLUSTER_MODE=true
# Custom name for your cluster (defaults to the detected cluster name or 'proxmox-cluster')
# PROXMOX_CLUSTER_NAME=my-cluster
# === Testing Options ===
# Set to 'true' to use mock data instead of connecting to a real Proxmox server
# For production: false
# For development with mock data: true
USE_MOCK_DATA=false
MOCK_DATA_ENABLED=false
# === Mock Cluster Settings ===
# Only used when mock data is enabled
# Set to 'false' to disable mock cluster mode
# MOCK_CLUSTER_ENABLED=true
# Custom name for the mock cluster
# MOCK_CLUSTER_NAME=mock-cluster
# === Docker Configuration ===
# Docker container name
CONTAINER_NAME=pulse
# Which Dockerfile to use (you shouldn't need to change this)
# For production: docker/Dockerfile
# For development: docker/Dockerfile.dev
DOCKERFILE=docker/Dockerfile
# Container restart policy
RESTART_POLICY=unless-stopped
# Set to 'true' to run in test mode (no actual changes will be made)
DRY_RUN=false
# === Developer Options ===
# Uncomment these lines only if you're developing or modifying the application
# DEV_SRC_MOUNT=./src:/app/src
# DEV_FRONTEND_SRC_MOUNT=./frontend/src:/app/frontend/src
# DEV_FRONTEND_PUBLIC_MOUNT=./frontend/public:/app/frontend/public
# DEV_FRONTEND_INDEX_MOUNT=./frontend/index.html:/app/frontend/index.html
# DEV_FRONTEND_CONFIG_MOUNT=./frontend/vite.config.js:/app/frontend/vite.config.js
# DEV_SCRIPTS_MOUNT=./scripts:/app/scripts
# DEV_ENV_MOUNT=./environments:/app/environments
# === Frontend Configuration ===
# NOTE: It's recommended to NOT set VITE_API_URL as it can cause WebSocket connection issues
# The application will automatically use the correct URL based on how you access it
# VITE_API_URL=http://your-server-ip:7654