Fixed position size calculation: 00 investment now shows 00 position (was 04.76) Fixed token amount display: Now shows correct tokens (~0.996) for 00 investment (was 2.04) Corrected API route: /api/automation/analysis-details now returns 200 instead of 405 Technical changes: - Updated route calculation logic: tradingAmount / trade.price for correct token amounts - Fixed displayPositionSize to show intended investment amount - Used Docker Compose v2 for container management - Resolved Next.js module export issues The API now correctly displays trade details matching user investment intentions.
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
services:
|
|
app:
|
|
container_name: trader_dev
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
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=: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=false
|
|
- SCREENSHOT_MAX_WORKERS=1
|
|
- BROWSER_POOL_SIZE=1
|
|
# Disable aggressive cleanup during development
|
|
- DISABLE_AUTO_CLEANUP=true
|
|
|
|
# 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
|
|
|
|
# Port mapping for development
|
|
ports:
|
|
- "9001:3000"
|
|
|
|
# X11 and display configuration for manual CAPTCHA solving
|
|
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
|