mirror of
https://github.com/triqbit/mt5-ai-xauusd-trader.git
synced 2026-11-02 06:56:15 +00:00
- Refactored Dockerfile into builder and runtime stages for minimal image size. - Added support for linux/amd64 and linux/arm64 architectures with specific PyTorch handling. - Implemented virtual environment isolation and TA-Lib C library compilation. - Added docker-compose.yml for local development with persistent logging and secure .env mounts. - Synchronized requirements-docker.txt with enterprise production standards. - Optimized build performance with BuildKit cache mounts. - Enhanced security with non-root user execution. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: triqbit <242833443+triqbit@users.noreply.github.com>
30 lines
756 B
YAML
30 lines
756 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
trader:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
TARGETARCH: amd64 # Default for local dev, Buildx handles this in CI
|
|
container_name: xauusd_trader
|
|
ports:
|
|
- "8000:8000" # Prometheus metrics / API
|
|
- "8050:8050" # Dash dashboard
|
|
volumes:
|
|
- ./.env:/app/.env:ro
|
|
- ./logs:/app/logs
|
|
- ./models:/app/models:ro
|
|
environment:
|
|
- MODE=${MODE:-demo}
|
|
- ALGO=${ALGO:-ensemble}
|
|
- LOG_LEVEL=${LOG_LEVEL:-INFO}
|
|
- PYTHONUNBUFFERED=1
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import src.core.config; print('healthy')"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|