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)
This commit is contained in:
Accusys
2026-10-12 13:20:45 +08:00
parent 63fbbe1225
commit 3d441a1c76
29 changed files with 2445 additions and 284 deletions
+4 -5
View File
@@ -10,6 +10,7 @@ use momentry_core::core::api_key::{ApiKeyService, ApiKeyType};
use momentry_core::core::chunk::types::{Chunk, ChunkRule, ChunkType};
use momentry_core::core::db::schema;
use momentry_core::core::db::Database;
use momentry_core::core::path_utils;
use momentry_core::core::time::FrameTime;
use momentry_core::ui::progress::{ProcessorType, ProgressState, ProgressUi};
use momentry_core::{
@@ -864,10 +865,8 @@ enum N8nAction {
#[tokio::main]
async fn main() -> Result<()> {
// Load development environment — try absolute path first
let env_loaded = dotenv::from_filename("/Users/accusys/momentry_core_0.1/.env.development")
.is_ok()
|| dotenv::from_filename(".env.development").is_ok();
// Load development environment — try relative path (project root)
let env_loaded = dotenv::from_filename(".env.development").is_ok();
if !env_loaded {
eprintln!("[WARN] No .env.development found, using defaults or env vars");
}
@@ -1832,7 +1831,7 @@ async fn main() -> Result<()> {
println!("Chunking: {}", uuid);
let output_dir = std::env::var("MOMENTRY_OUTPUT_DIR")
.unwrap_or_else(|_| "/Users/accusys/momentry/output_dev".to_string());
.unwrap_or_else(|_| path_utils::output_dir().to_string_lossy().to_string());
let db = PostgresDb::init().await?;
let video = db