Files
trading_bot_v3/docker-compose.dev.yml
mindesbunister 45202cabe7 🚀 Major optimization: Dual-session screenshot service + Docker build speed improvements
 Key Achievements:
- Fixed DIY module screenshot failures - now works 100%
- Optimized Docker builds for i7-4790K (4 cores/8 threads)
- Implemented true parallel dual-session screenshot capture
- Enhanced error diagnostics and navigation timeout handling

🔧 Technical Improvements:
- Enhanced screenshot service with robust parallel session management
- Optimized navigation with 90s timeout and domcontentloaded strategy
- Added comprehensive error handling with browser state capture
- Docker build optimizations: 8-thread npm installs, parallel downloads
- Improved layer caching and reduced build context
- Added fast-build.sh script for optimal CPU utilization

📸 Screenshot Service:
- Parallel AI + DIY module capture working flawlessly
- Enhanced error reporting for debugging navigation issues
- Improved chart loading detection and retry logic
- Better session cleanup and resource management

🐳 Docker Optimizations:
- CPU usage increased from 40% to 80-90% during builds
- Build time reduced from 5-10min to 2-3min
- Better caching and parallel package installation
- Optimized .dockerignore for faster build context

🧪 Testing Infrastructure:
- API-driven test scripts for Docker compatibility
- Enhanced monitoring and diagnostic tools
- Comprehensive error logging and debugging

Ready for AI analysis integration fixes next.
2025-07-13 17:26:49 +02:00

61 lines
1.9 KiB
YAML

services:
app:
build:
target: development # Use development target for faster builds
args:
- BUILDKIT_INLINE_CACHE=1
- NODE_VERSION=20.11.1
- PNPM_VERSION=8.15.1
# Development environment variables
environment:
- NODE_ENV=development
- DOCKER_ENV=true
- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
- PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
- TRADINGVIEW_RECORD_VIDEO=true
- TZ=Europe/Berlin
- CHROMIUM_PATH=/usr/bin/chromium
- DISABLE_CHROME_SANDBOX=true
- DISPLAY=${DISPLAY:-:0}
- ALLOW_MANUAL_CAPTCHA=true
- DATABASE_URL=file:./prisma/dev.db
# Development optimizations
- CHOKIDAR_USEPOLLING=false
- WATCHPACK_POLLING=false
- NEXT_TELEMETRY_DISABLED=1
# Enhanced screenshot service development settings
- SCREENSHOT_PARALLEL_SESSIONS=true
- SCREENSHOT_MAX_WORKERS=2
- BROWSER_POOL_SIZE=1
# Load environment variables from .env file
env_file:
- .env
# Development volumes with better performance
volumes:
- ./screenshots:/app/screenshots:cached
- ./videos:/app/videos:cached
- ./.tradingview-session:/app/.tradingview-session:cached
- ./prisma:/app/prisma:cached
# X11 forwarding for GUI display (when ALLOW_MANUAL_CAPTCHA=true)
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# Development source code volumes for hot reloading
- ./app:/app/app:cached
- ./lib:/app/lib:cached
- ./components:/app/components:cached
- ./package.json:/app/package.json:ro
# X11 and display configuration for manual CAPTCHA solving
network_mode: host
privileged: true
# Faster health check for development
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/ || exit 1"]
interval: 10s
timeout: 5s
retries: 2
start_period: 15s