41 lines
909 B
YAML
41 lines
909 B
YAML
# Database Configuration
|
|
|
|
# Database URL (can be overridden by DATABASE_URL environment variable)
|
|
database_url: "${DATABASE_URL:-sqlite:///data/ict_trading.db}"
|
|
|
|
# Connection pool settings
|
|
pool_size: 10
|
|
max_overflow: 20
|
|
pool_timeout: 30
|
|
pool_recycle: 3600 # Recycle connections after 1 hour
|
|
|
|
# SQLAlchemy settings
|
|
echo: false # Set to true for SQL query logging
|
|
echo_pool: false
|
|
|
|
# Database-specific settings
|
|
sqlite:
|
|
# SQLite-specific settings
|
|
check_same_thread: false
|
|
timeout: 20
|
|
|
|
postgresql:
|
|
# PostgreSQL-specific settings
|
|
connect_args:
|
|
connect_timeout: 10
|
|
application_name: "ict_ml_trading"
|
|
|
|
# Migration settings
|
|
alembic:
|
|
script_location: "alembic"
|
|
version_path_separator: "os"
|
|
sqlalchemy.url: "${DATABASE_URL:-sqlite:///data/ict_trading.db}"
|
|
|
|
# Backup settings
|
|
backup:
|
|
enabled: true
|
|
frequency: "daily" # daily, weekly
|
|
retention_days: 30
|
|
backup_path: "backups/database"
|
|
|