Update README and configuration for macOS support
- Revamped README.md to enhance clarity and detail on features, installation, and system requirements for Archipelago. - Added macOS-specific configuration in `config.rs` to detect when running from a macOS app bundle, adjusting data directory paths accordingly. - Introduced a new production build script in `package.json` for optimized deployment of the Neode UI.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# Archipelago Production Configuration
|
||||
# This file is bundled with the macOS app
|
||||
|
||||
# Server Configuration
|
||||
ARCHIPELAGO_HOST=127.0.0.1
|
||||
ARCHIPELAGO_PORT=8100
|
||||
ARCHIPELAGO_BACKEND_PORT=3030
|
||||
|
||||
# Data Directories (relative to ~/Library/Application Support/Archipelago)
|
||||
ARCHIPELAGO_DATA_DIR=data
|
||||
ARCHIPELAGO_LOG_DIR=logs
|
||||
|
||||
# Frontend Configuration
|
||||
ARCHIPELAGO_FRONTEND_DIR=frontend
|
||||
|
||||
# Docker UI Configuration
|
||||
ARCHIPELAGO_DOCKER_UI_DIR=docker-ui
|
||||
|
||||
# Security
|
||||
ARCHIPELAGO_SESSION_SECRET=CHANGE_ME_ON_FIRST_RUN
|
||||
|
||||
# Logging
|
||||
RUST_LOG=info
|
||||
|
||||
# Production Mode
|
||||
NODE_ENV=production
|
||||
ARCHIPELAGO_MODE=production
|
||||
|
||||
# Docker Configuration
|
||||
DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
# Disable External API Calls in Production
|
||||
ARCHIPELAGO_DISABLE_EXTERNAL_APIS=true
|
||||
@@ -57,6 +57,22 @@ impl Config {
|
||||
pub async fn load() -> Result<Self> {
|
||||
// Default configuration
|
||||
let mut config = Self::default();
|
||||
|
||||
// Detect if running from macOS app bundle
|
||||
if let Ok(exe_path) = std::env::current_exe() {
|
||||
if let Some(exe_str) = exe_path.to_str() {
|
||||
if exe_str.contains(".app/Contents/MacOS") {
|
||||
// Running from macOS bundle - use user's Library directory
|
||||
if let Some(home) = std::env::var_os("HOME") {
|
||||
let app_support = PathBuf::from(home)
|
||||
.join("Library/Application Support/Archipelago");
|
||||
config.data_dir = app_support.join("data");
|
||||
config.dev_data_dir = app_support.join("data");
|
||||
tracing::info!("🍎 Detected macOS bundle, using: {}", app_support.display());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Try to load from config file
|
||||
let config_path = Path::new("/etc/archipelago/config.toml");
|
||||
|
||||
Reference in New Issue
Block a user