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
+14 -16
View File
@@ -611,23 +611,21 @@ pub async fn check_schema_migrations(pool: &sqlx::PgPool) -> SchemaHealth {
async fn check_rsync() -> ServiceStatus {
let start = Instant::now();
let paths = [
std::path::Path::new("/Users/accusys/bin/rsync"),
std::path::Path::new("/opt/homebrew/bin/rsync"),
];
for p in &paths {
if p.exists() {
return ServiceStatus {
status: "ok".to_string(),
latency_ms: Some(start.elapsed().as_millis() as u64),
error: None,
};
let rsync_path = std::env::var("MOMENTRY_RSYNC_PATH")
.unwrap_or_else(|_| "/opt/homebrew/bin/rsync".to_string());
let p = std::path::Path::new(&rsync_path);
if p.exists() {
ServiceStatus {
status: "ok".to_string(),
latency_ms: Some(start.elapsed().as_millis() as u64),
error: None,
}
} else {
ServiceStatus {
status: "error".to_string(),
latency_ms: Some(start.elapsed().as_millis() as u64),
error: Some(format!("rsync not found at {}", rsync_path)),
}
}
ServiceStatus {
status: "error".to_string(),
latency_ms: Some(start.elapsed().as_millis() as u64),
error: Some("rsync not found (built from source expected at ~/bin/rsync)".to_string()),
}
}
+2 -1
View File
@@ -60,7 +60,8 @@ pub async fn list_user_files(
let base_path = std::env::var("MOMENTRY_SFTP_ROOT")
.map(PathBuf::from)
.unwrap_or_else(|_| {
PathBuf::from("/Users/accusys/momentry/var/sftpgo/data/demo")
// Use centralized path utility
crate::core::path_utils::demo_dir()
});
let mut files = Vec::new();