- Updated `docker-compose.yml` to remove hardcoded passwords, relying on environment variables for PostgreSQL and Redis configurations. - Modified `env.template` to reflect new password settings and ensure secure handling of sensitive information. - Introduced a new `database/connection.py` file for improved database connection management, including connection pooling and session handling. - Updated `database/models.py` to align with the new schema in `schema_clean.sql`, utilizing JSONB for optimized data storage. - Enhanced `setup.md` documentation to clarify the initialization process and emphasize the importance of the `.env` file for configuration. - Added a new `scripts/init_database.py` script for automated database initialization and verification, ensuring all tables are created as expected.
38 lines
862 B
Plaintext
38 lines
862 B
Plaintext
# Database Configuration
|
|
POSTGRES_DB=dashboard
|
|
POSTGRES_USER=dashboard
|
|
POSTGRES_PASSWORD=sdkjfh534^jh
|
|
POSTGRES_HOST=localhost
|
|
POSTGRES_PORT=5434
|
|
DATABASE_URL=postgresql://dashboard:sdkjfh534^jh@localhost:5434/dashboard
|
|
|
|
# Redis Configuration
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_PASSWORD=redis987secure
|
|
|
|
# OKX API Configuration
|
|
OKX_API_KEY=your_okx_api_key_here
|
|
OKX_SECRET_KEY=your_okx_secret_key_here
|
|
OKX_PASSPHRASE=your_okx_passphrase_here
|
|
OKX_SANDBOX=true
|
|
|
|
# Application Configuration
|
|
DEBUG=true
|
|
ENVIRONMENT=development
|
|
LOG_LEVEL=INFO
|
|
|
|
# Dashboard Configuration
|
|
DASH_HOST=0.0.0.0
|
|
DASH_PORT=8050
|
|
DASH_DEBUG=true
|
|
|
|
# Bot Configuration
|
|
MAX_CONCURRENT_BOTS=5
|
|
BOT_UPDATE_INTERVAL=2 # seconds
|
|
DEFAULT_VIRTUAL_BALANCE=10000
|
|
|
|
# Data Configuration
|
|
MARKET_DATA_SYMBOLS=BTC-USDT,ETH-USDT,LTC-USDT
|
|
HISTORICAL_DATA_DAYS=30
|
|
CHART_UPDATE_INTERVAL=2000 # milliseconds |