This commit is contained in:
2025-12-26 20:54:20 +01:00
parent 904feb41b8
commit 6389be4f0c
26 changed files with 745 additions and 195 deletions

View File

@@ -1,18 +1,89 @@
# Development Environment Configuration
# Copy this file to .env.development and adjust values as needed
# ==========================================
# GridPilot Development Environment Example
# ==========================================
# Copy to `.env.development` and adjust values as needed.
#
# This file is consumed by `docker-compose.dev.yml` (API, Website, Postgres).
# Automation mode: 'dev' | 'production' | 'mock'
AUTOMATION_MODE=dev
# ------------------------------------------
# Runtime
# ------------------------------------------
NODE_ENV=development
NEXT_TELEMETRY_DISABLED=1
# Chrome DevTools settings (for dev mode)
# ------------------------------------------
# API (NestJS)
# ------------------------------------------
# API persistence is inferred from DATABASE_URL by default.
# GRIDPILOT_API_PERSISTENCE=postgres
DATABASE_URL=postgres://gridpilot_user:gridpilot_dev_pass@db:5432/gridpilot_dev
# Postgres container vars (used by docker `db` service)
POSTGRES_DB=gridpilot_dev
POSTGRES_USER=gridpilot_user
POSTGRES_PASSWORD=gridpilot_dev_pass
# ------------------------------------------
# Website (Next.js) - public (exposed to browser)
# ------------------------------------------
NEXT_PUBLIC_GRIDPILOT_MODE=alpha
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# Browser → API base URL (host port 3001 -> container port 3000)
NEXT_PUBLIC_API_BASE_URL=http://localhost:3001
# Optional links / metadata
NEXT_PUBLIC_DISCORD_URL=https://discord.gg/your-invite-code
NEXT_PUBLIC_X_URL=https://x.com/your-handle
# NEXT_PUBLIC_SITE_NAME=GridPilot
# NEXT_PUBLIC_SUPPORT_EMAIL=support@example.com
# NEXT_PUBLIC_SPONSOR_EMAIL=sponsors@example.com
# NEXT_PUBLIC_LEGAL_COMPANY_NAME=
# NEXT_PUBLIC_LEGAL_VAT_ID=
# NEXT_PUBLIC_LEGAL_REGISTERED_COUNTRY=
# NEXT_PUBLIC_LEGAL_REGISTERED_ADDRESS=
# ------------------------------------------
# Vercel KV (optional in dev)
# ------------------------------------------
# If unset, the Website uses an in-memory fallback with a warning.
# KV_REST_API_URL=
# KV_REST_API_TOKEN=
# ------------------------------------------
# Automation / Companion (advanced)
# ------------------------------------------
# Prefer using NODE_ENV=development/test. `AUTOMATION_MODE` is legacy & deprecated.
# AUTOMATION_MODE=dev
CHROME_DEBUG_PORT=9222
# CHROME_WS_ENDPOINT=ws://127.0.0.1:9222/devtools/browser/<id>
# Shared automation settings
# Native automation tuning (optional)
# IRACING_WINDOW_TITLE=iRacing
# TEMPLATE_PATH=./resources/templates/iracing
# OCR_CONFIDENCE=0.9
# NUTJS_MOUSE_SPEED=1000
# NUTJS_KEYBOARD_DELAY=50
# AUTOMATION_MAX_RETRIES=3
# AUTOMATION_BASE_DELAY_MS=500
# AUTOMATION_MAX_DELAY_MS=5000
# AUTOMATION_BACKOFF_MULTIPLIER=2
# AUTOMATION_PAGE_LOAD_WAIT_MS=5000
# AUTOMATION_INTER_ACTION_DELAY_MS=200
# AUTOMATION_POST_CLICK_DELAY_MS=300
# AUTOMATION_PRE_STEP_DELAY_MS=100
AUTOMATION_TIMEOUT=30000
RETRY_ATTEMPTS=3
SCREENSHOT_ON_ERROR=true
# Logging (automation/adapters)
# LOG_LEVEL=debug
# LOG_FILE_PATH=./logs/gridpilot
# LOG_MAX_FILES=7
# LOG_MAX_SIZE=10m
# Start Chrome with debugging enabled:
# /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
# Or use: npm run chrome:debug