Files
pulse/mock.env
T
rcourtman 1c2431fcf6 refactor: add mock.env to repository with local override support
Make mock mode configuration part of the repository instead of a local-only
file. This ensures consistent mock mode behavior across all environments
(development, CI/CD, demo server) and makes it work out of the box for
new contributors.

Changes:
- Add mock.env to repository with sensible defaults (mock mode OFF by default)
- Support mock.env.local for personal overrides (gitignored)
- Update .gitignore to allow mock.env but exclude .local variants
- Backend loads mock.env then merges mock.env.local overrides
- hot-dev.sh loads both files in correct order

Benefits:
- New developers can clone and use mock mode immediately
- Demo server gets consistent mock configuration
- Personal preferences stay private in .local file
- No surprises - mock mode disabled by default in fresh clones
- CI/CD can use mock mode without custom configuration

Documentation:
- Updated README.md to explain mock.env is in repo
- Enhanced MOCK_MODE.md with local override instructions
- Updated claude.md with new configuration strategy
- Added mock.env.local.example for quick setup

Example workflow:
  git clone <repo>
  npm run mock:on        # Works immediately with repo defaults
  # Or create personal config:
  cp docs/development/mock.env.local.example mock.env.local
  # Edit mock.env.local with your preferences
2025-10-01 13:38:39 +00:00

39 lines
1.4 KiB
Bash

# Mock Mode Configuration
# This file is part of the repository and provides default mock mode settings.
# Mock mode generates realistic test data for development without requiring real Proxmox infrastructure.
#
# Quick Start:
# npm run mock:on # Enable mock mode
# npm run mock:off # Disable mock mode
# npm run mock:edit # Edit this configuration
#
# The backend automatically reloads when this file changes (no manual restart needed).
#
# Documentation: docs/development/MOCK_MODE.md
# Enable/disable mock mode (false = use real Proxmox infrastructure)
PULSE_MOCK_MODE=false
# Number of mock nodes to generate (mix of clustered and standalone)
# First 5 nodes form a cluster, remaining nodes are standalone
PULSE_MOCK_NODES=7
# Average number of VMs per node
# Actual count varies based on node role (vm-heavy, container-heavy, light, mixed)
PULSE_MOCK_VMS_PER_NODE=5
# Average number of LXC containers per node
# Containers have lighter resource usage than VMs
PULSE_MOCK_LXCS_PER_NODE=8
# Enable realistic metric fluctuations (CPU, memory, disk, network)
# When true, metrics change every 2 seconds to simulate real workloads
PULSE_MOCK_RANDOM_METRICS=true
# Percentage of guests (VMs + containers) that should be in stopped state
# Set to 0 for all running, 100 for all stopped, 20 for realistic mix
PULSE_MOCK_STOPPED_PERCENT=20
# Local overrides (not tracked in git):
# Create mock.env.local for your personal settings - it will override these defaults