Files
momentry_core/.env.example
T
Accusys 3d441a1c76 release: v1.3.2 - Cross-Machine Deployment Support
Major Changes:
- Removed all hardcoded paths for cross-machine deployment
- Added unified path management module (path_utils.rs)
- Supports arbitrary user home directories
- Environment variable configuration for all paths

New Features:
- path_utils module with 15+ path resolution functions
- Dynamic user home directory detection
- Environment variable overrides for all paths
- Default paths using $HOME/momentry and $HOME/momentry_core

Fixed Files:
- Rust code: 8 core files (release.rs, service.rs, markbase_compat.rs, etc.)
- Python scripts: 10 files (ASR, ASRX, Face, Identity, VLM, Migration)
- Configuration: production.env (removed hardcoded paths)

Environment Variables Supported:
- HOME - User home directory
- MOMENTRY_ROOT - Momentry root directory
- MOMENTRY_CORE_DIR - Momentry_core directory
- MOMENTRY_OUTPUT_DIR - Output directory
- MOMENTRY_BACKUP_DIR - Backup directory
- MOMENTRY_STORAGE_ROOT - Storage root directory
- MOMENTRY_SCRIPTS_DIR - Scripts directory
- MOMENTRY_CLI_DIR - CLI tools directory

Breaking Changes:
- None (backward compatible with environment variables)

Deployment:
- Can now deploy to any machine with any username
- No hardcoded /Users/accusys paths in core functionality
- Ready for M4ProMini deployment (/Users/nextorageai)
2026-10-12 13:20:45 +08:00

84 lines
2.3 KiB
Bash

# Momentry Core Environment Configuration
# Copy this file to .env and fill in your values
# DO NOT commit .env to version control
# === Database ===
DATABASE_URL=postgres://accusys@localhost:5432/momentry
DATABASE_SCHEMA=dev
# === MongoDB ===
MONGODB_URL=mongodb://localhost:27017
MONGODB_DATABASE=momentry
MONGODB_CACHE_ENABLED=true
# === Redis ===
REDIS_URL=redis://:accusys@localhost:6379
REDIS_PASSWORD=accusys
MOMENTRY_REDIS_PREFIX=momentry_dev:
# === Qdrant ===
QDRANT_COLLECTION=momentry_rule1
# === API Keys ===
MOMENTRY_API_KEY=muser_your_key_here
MOMENTRY_DEMO_API_KEY=muser_your_demo_key_here
JWT_SECRET=your_jwt_secret_here_change_in_production
SFTPGO_BASE_URL=http://127.0.0.1:8080
TMDB_API_KEY=your_tmdb_api_key_here
# === LLM ===
MOMENTRY_LLM_SUMMARY_URL=http://127.0.0.1:8082/v1/chat/completions
MOMENTRY_LLM_SUMMARY_MODEL=google_gemma-4-26B-A4B-it-Q5_K_M.gguf
MOMENTRY_LLM_SUMMARY_TIMEOUT=120
# LLM Chat (A4B)
MOMENTRY_LLM_CHAT_URL=http://127.0.0.1:8082/v1/chat/completions
MOMENTRY_LLM_CHAT_MODEL=google_gemma-4-26B-A4B-it-Q5_K_M.gguf
MOMENTRY_LLM_CHAT_TIMEOUT=120
# LLM Vision (E4B)
MOMENTRY_LLM_VISION_URL=http://127.0.0.1:8083/v1/chat/completions
MOMENTRY_LLM_VISION_MODEL=gemma-4-E4B-it-Q4_K_M.gguf
MOMENTRY_LLM_VISION_TIMEOUT=120
# === Paths ===
# These paths will be auto-detected if not set
# Default: $HOME/momentry/output_dev
# MOMENTRY_OUTPUT_DIR=/path/to/output
# Default: $HOME/momentry/backup
# MOMENTRY_BACKUP_DIR=/path/to/backup
# Default: $PROJECT_ROOT/tools/script
# MOMENTRY_SCRIPTS_DIR=/path/to/scripts
# Default: /opt/homebrew/bin/python3.11
# MOMENTRY_PYTHON_PATH=/path/to/python
MOMENTRY_FFMPEG=/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg
MOMENTRY_MEDIA_BASE_URL=
# === Encryption ===
AUDIT_ENCRYPTION_KEY= # 32 bytes hex (64 hex chars)
# === Processor Timeouts (seconds) ===
MOMENTRY_ASR_TIMEOUT=3600
MOMENTRY_CUT_TIMEOUT=3600
MOMENTRY_DEFAULT_TIMEOUT=7200
# === Server ===
MOMENTRY_SERVER_PORT=3003
MOMENTRY_LOG_LEVEL=info
# === Package Paths (init resolves @ROOT@ to install root) ===
MOMENTRY_ENV_FILE=@ROOT@/config/.env
MOMENTRY_SFTP_ROOT=@ROOT@/var/sftpgo/data/demo
MOMENTRY_STORAGE_ROOT=@ROOT@/var/sftpgo/data
MOMENTRY_OUTPUT_DIR=@ROOT@/var/output
MOMENTRY_DATA_DIR=@ROOT@/data
MOMENTRY_PROCESSORS_DIR=@ROOT@/processors
# === Init ===
MOMENTRY_API_KEY=