Pulse/docs/development/mock.env.local.example
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

23 lines
737 B
Text

# mock.env.local.example
# Copy this to /opt/pulse/mock.env.local for your personal mock mode settings
# The .local file is gitignored and will override values from mock.env
#
# Usage:
# cp docs/development/mock.env.local.example mock.env.local
# # Edit mock.env.local with your preferences
# npm run mock:on
# Example: Always start in mock mode for frontend development
PULSE_MOCK_MODE=true
# Example: Use fewer nodes for faster startup
PULSE_MOCK_NODES=3
# Example: More VMs for testing high-density scenarios
# PULSE_MOCK_VMS_PER_NODE=10
# Example: Disable metric fluctuations for consistent testing
# PULSE_MOCK_RANDOM_METRICS=false
# Example: All guests running (no stopped VMs/containers)
# PULSE_MOCK_STOPPED_PERCENT=0