fix: use absolute paths for database to ensure persistence
Critical bug fix: Path(__file__).parent.parent returns a relative path, causing the database to be created in different locations depending on the working directory. This caused data loss on container restarts. Changes: - Add .resolve() to BASE_DIR in src/config.py and migrations/env.py - Fix admin dashboard showing 0 for participant count (was hardcoded) - Fix exchange detail page to show actual participant list - Add startup diagnostics to entrypoint.sh for troubleshooting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -12,8 +12,8 @@ from pathlib import Path
|
||||
class Config:
|
||||
"""Base configuration class with common settings."""
|
||||
|
||||
# Base paths
|
||||
BASE_DIR = Path(__file__).parent.parent
|
||||
# Base paths - use resolve() to ensure absolute paths
|
||||
BASE_DIR = Path(__file__).parent.parent.resolve()
|
||||
DATA_DIR = BASE_DIR / "data"
|
||||
|
||||
# Security
|
||||
|
||||
Reference in New Issue
Block a user