mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-02 09:37:23 -04:00
Move database initialization logic from shell script to Python application lifespan, following separation of concerns and improving maintainability. Benefits: - Single source of truth for database initialization (api/main.py lifespan) - Better testability - Python code vs shell scripts - Clearer logging with structured messages - Easier to debug and maintain - Infrastructure (entrypoint.sh) focuses on service orchestration - Application (api/main.py) owns its data layer Changes: - Removed database init from entrypoint.sh - Enhanced lifespan function with detailed logging - Simplified entrypoint script (now 4 steps instead of 5) - All tests pass (28/28 API endpoint tests)