version: '3.8' services: redis: image: redis:7-alpine ports: - '6379:6379' volumes: - redis-data:/data command: redis-server --appendonly yes postgres: image: postgres:16-alpine ports: - '5432:5432' environment: POSTGRES_DB: tradeai POSTGRES_USER: tradeai POSTGRES_PASSWORD: tradeai_dev volumes: - pg-data:/var/lib/postgresql/data ai-sidecar: build: context: ./ai-sidecar dockerfile: Dockerfile ports: - '8000:8000' environment: AI_SIDECAR_LOG_LEVEL: info restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 30s timeout: 10s retries: 3 start_period: 60s dashboard: build: context: ./dashboard dockerfile: Dockerfile ports: - '3001:3001' environment: NEXT_PUBLIC_ENGINE_URL: http://engine:3000 depends_on: - ai-sidecar restart: unless-stopped healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001', r => process.exit(r.statusCode === 200 ? 0 : 1))"] interval: 30s timeout: 10s retries: 3 start_period: 30s volumes: redis-data: pg-data: