169 lines
6.6 KiB
Plaintext
169 lines
6.6 KiB
Plaintext
# ==========================================
|
||
# MOMO 監控系統 - 環境變數配置模板
|
||
# ==========================================
|
||
# 複製此檔案為 .env 並填入實際值
|
||
# 注意:.env 檔案已加入 .gitignore,不會被提交到版本控制
|
||
|
||
# ==========================================
|
||
# 安全設定
|
||
# ==========================================
|
||
# [必填] 登入密碼(弱密碼會被 LoginManager 拒絕)
|
||
LOGIN_PASSWORD=your_strong_password_here
|
||
|
||
# [必填] Flask session 簽章密鑰(建議 openssl rand -hex 32)
|
||
SECRET_KEY=your_flask_secret_key_here
|
||
|
||
# [預設 false] 開發測試用:設 true 可繞過所有 @login_required(生產環境嚴禁開啟)
|
||
DISABLE_LOGIN=false
|
||
|
||
# ==========================================
|
||
# Telegram Bot 設定
|
||
# ==========================================
|
||
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
|
||
TELEGRAM_CHAT_IDS=["chat_id_1","chat_id_2","chat_id_3"]
|
||
|
||
# ==========================================
|
||
# Line Notify 設定
|
||
# ==========================================
|
||
LINE_CHANNEL_ACCESS_TOKEN=your_line_channel_access_token
|
||
LINE_GROUP_ID=your_line_group_id
|
||
|
||
# ==========================================
|
||
# Email (SMTP) 設定
|
||
# ==========================================
|
||
EMAIL_HOST=smtp.gmail.com
|
||
EMAIL_PORT=587
|
||
EMAIL_HOST_USER=your_email@gmail.com
|
||
EMAIL_HOST_PASSWORD=your_email_app_password
|
||
EMAIL_SENDER=your_email@gmail.com
|
||
EMAIL_RECEIVER=receiver_email@gmail.com
|
||
|
||
# ==========================================
|
||
# 網路設定
|
||
# ==========================================
|
||
PUBLIC_URL=http://your_server_ip:port
|
||
NGROK_AUTH_TOKEN=your_ngrok_auth_token
|
||
|
||
# ==========================================
|
||
# 通訊模組設定(從環境變數讀取)
|
||
# ==========================================
|
||
|
||
# --- Alert Webhook ---
|
||
ALERT_WEBHOOK_USER=alertmanager
|
||
ALERT_WEBHOOK_PASSWORD=your_secure_webhook_password_here
|
||
|
||
# --- GitLab CI/CD ---
|
||
GITLAB_URL=http://192.168.0.110:8929
|
||
GITLAB_TOKEN=your_gitlab_token_here
|
||
GITLAB_PROJECT_ID=1
|
||
|
||
# --- Telegram Bot ---
|
||
|
||
# ==========================================
|
||
# HTTPS 設定(生產環境)
|
||
# ==========================================
|
||
# 如果部署在 HTTPS 環境,設為 true
|
||
USE_HTTPS=false
|
||
|
||
# ==========================================
|
||
# Database Settings
|
||
# ==========================================
|
||
# PostgreSQL Configuration (Production)
|
||
POSTGRES_HOST=momo-postgres
|
||
POSTGRES_PORT=5432
|
||
POSTGRES_USER=momo
|
||
POSTGRES_PASSWORD=your_secure_postgres_password_here
|
||
POSTGRES_DB=momo_analytics
|
||
|
||
# SQLite Configuration (Development/Backup)
|
||
SQLITE_PATH=data/momo_database.db
|
||
|
||
# Database Type Selection (postgresql or sqlite)
|
||
USE_POSTGRESQL=true
|
||
|
||
# ==========================================
|
||
# Google Drive 自動匯入設定
|
||
# ==========================================
|
||
# 說明:系統會自動從 Google Drive 下載、匯入並刪除當日業績 Excel 檔案
|
||
# 設定方式:請參考 GOOGLE_DRIVE_SETUP.md
|
||
# 認證檔案位置:config/google_credentials.json
|
||
# Token 檔案位置:config/google_token.pickle(首次認證後自動產生)
|
||
GDRIVE_FOLDER_PATH=業績報表/當日業績
|
||
GDRIVE_FILE_PATTERN=即時業績_當日
|
||
|
||
# ==========================================
|
||
# Hermes 3 競價情報分析(Module 2 / ADR-012)
|
||
# ==========================================
|
||
# [預設 http://192.168.0.111:11434] Hermes Ollama 端點(內網免認證)
|
||
HERMES_URL=http://192.168.0.111:11434
|
||
|
||
# [預設 120] Hermes 推理 timeout(秒);批量 300 筆預估 ~90s
|
||
HERMES_TIMEOUT=120
|
||
|
||
# [預設 HERMES_URL] Embedding 服務主機(ADR-003 對齊:embedding 走 Hermes 主機)
|
||
# EMBEDDING_HOST=http://192.168.0.111:11434
|
||
|
||
# ==========================================
|
||
# Elephant Alpha AI Agent Super Orchestrator Settings
|
||
# ==========================================
|
||
# Description: Elephant Alpha (100B parameter model) for autonomous AI agent coordination
|
||
# Provider: OpenRouter AI
|
||
# Documentation: https://openrouter.ai/docs/quick-start
|
||
|
||
# OpenRouter API Configuration
|
||
OPENROUTER_API_KEY=sk-or-v1-your-openrouter-api-key-here
|
||
ELEPHANT_ALPHA_MODEL=openrouter/elephant-alpha
|
||
|
||
# Elephant Alpha Behavior Configuration
|
||
ELEPHANT_ALPHA_CONFIDENCE_THRESHOLD=0.7
|
||
ELEPHANT_ALPHA_MAX_AUTONOMOUS_DECISIONS_PER_HOUR=10
|
||
ELEPHANT_ALPHA_TIMEOUT_SECONDS=180
|
||
ELEPHANT_ALPHA_CONTEXT_WINDOW=256000
|
||
|
||
# Autonomous Engine Settings
|
||
ELEPHANT_ALPHA_LEARNING_RATE=0.1
|
||
ELEPHANT_ALPHA_PERFORMANCE_TRACKING=true
|
||
ELEPHANT_ALPHA_AUTO_ESCALATION_ENABLED=true
|
||
|
||
# Integration Settings
|
||
ELEPHANT_ALPHA_HERMES_URL=http://192.168.0.111:11434
|
||
ELEPHANT_ALPHA_HERMES_MODEL=hermes3:latest
|
||
ELEPHANT_ALPHA_NEMOTRON_NIM_ENDPOINT=https://integrate.api.nvidia.com/v1
|
||
ELEPHANT_ALPHA_OPENCLAW_GEMINI_ENDPOINT=https://generativelanguage.googleapis.com/v1beta
|
||
|
||
# ── Google Gemini API ───────────────────────────────────────────────────────
|
||
# OpenClaw 策略師 / MCP Collector / Code Review Pipeline 共用金鑰
|
||
# 取得方式:https://aistudio.google.com/app/apikey
|
||
# 注意:Gemini 2.0 Flash 將於 2026-06-01 關閉,後續需遷移至 2.5 Flash
|
||
GEMINI_API_KEY=<change-me>
|
||
GEMINI_MODEL=gemini-1.5-flash
|
||
OPENCLAW_MODEL=gemini-2.5-flash-preview-05-20
|
||
|
||
# Debug and Monitoring
|
||
ELEPHANT_ALPHA_DEBUG_MODE=false
|
||
ELEPHANT_ALPHA_METRICS_ENABLED=true
|
||
ELEPHANT_ALPHA_AUDIT_LOGGING=true
|
||
|
||
# ── System Maintenance API ──────────────────────────────────────────────────
|
||
# X-Internal-Key 標頭認證金鑰(必填)
|
||
# 用於 /api/system/cleanup/* 和 /api/system/health 等維護路由。
|
||
# 建議使用 openssl rand -hex 32 生成。
|
||
INTERNAL_API_KEY=your-secret-internal-key-here
|
||
|
||
# ──────────────────────────────────────────────────────────────────────────
|
||
# 初始管理員 / Bot API / SSH Jump(Phase 1-3 後新增的必需變數)
|
||
# ──────────────────────────────────────────────────────────────────────────
|
||
|
||
# [必填於首次部署] 初始管理員密碼(services/user_service.py create_initial_admin 用)
|
||
INITIAL_ADMIN_PASSWORD=your_initial_admin_password_here
|
||
|
||
# [選填] Bot API 端點認證 Token(routes/bot_api_routes.py)
|
||
# 不設則所有 /bot/api/* 端點拒絕請求
|
||
BOT_API_TOKEN=your_bot_api_token_here
|
||
|
||
# [選填] AIOps SSH Jump 跳板設定(services/jump_executor.py)
|
||
SSH_JUMP_HOST=192.168.0.110
|
||
SSH_JUMP_USER=wooo
|
||
SSH_TARGET_HOST=192.168.0.188
|
||
SSH_TARGET_USER=ollama
|