diff --git a/README-Docker.md b/README-Docker.md index 7746b6d8..d52a4205 100644 --- a/README-Docker.md +++ b/README-Docker.md @@ -50,7 +50,7 @@ open http://localhost:8008 SoulSync requires persistent storage for: - **`./config`** → `/app/config` - Configuration files -- **`./database`** → `/app/database` - SQLite database files +- **`./data`** → `/app/data` - SQLite database files - **`./logs`** → `/app/logs` - Application logs - **`./downloads`** → `/app/downloads` - Downloaded music files - **`./Transfer`** → `/app/Transfer` - Processed/matched music files @@ -229,7 +229,7 @@ services: - "8888:8888" volumes: - ./config:/app/config - - ./database:/app/database + - ./data:/app/data - ./logs:/app/logs - ./downloads:/app/downloads - ./Transfer:/app/Transfer diff --git a/web_server.py b/web_server.py index de510f78..e0a76918 100644 --- a/web_server.py +++ b/web_server.py @@ -47,7 +47,14 @@ from beatport_unified_scraper import BeatportUnifiedScraper # --- Flask App Setup --- base_dir = os.path.abspath(os.path.dirname(__file__)) project_root = os.path.dirname(base_dir) # Go up one level to the project root -config_path = os.path.join(project_root, 'config', 'config.json') + +# Check for environment variable first (Docker support), then fallback to calculated path +env_config_path = os.environ.get('SOULSYNC_CONFIG_PATH') +if env_config_path: + config_path = env_config_path + print(f"🔧 Using config path from environment: {config_path}") +else: + config_path = os.path.join(project_root, 'config', 'config.json') if os.path.exists(config_path): print(f"Found config file at: {config_path}")