services: backend: build: context: . dockerfile: Dockerfile.backend container_name: vl-ocr-backend ports: - "8000:8000" environment: - VLLM_API_URL=http://host.docker.internal:10023/v1/chat/completions - VLLM_API_KEY=unused - VLLM_MODEL_NAME=/model - MAX_GENERATION_TOKENS=2048 - MAX_BATCH_SIZE=8 - MAX_CONCURRENT_REQUESTS=16 - MAX_PARALLEL_BATCHES=6 - BATCH_JOB_PAGES_PER_BATCH=2 - IMAGE_MAX_SIZE=1024 - IMAGE_JPEG_QUALITY=85 - TIMEOUT_SECONDS=30 extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 frontend: build: context: . dockerfile: Dockerfile.frontend container_name: vl-ocr-frontend ports: - "8501:8501" environment: # Default backend URL (will be auto-detected from browser for LAN access) - BACKEND_URL=http://backend:8000 depends_on: - backend extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8501 > /dev/null 2>&1"] interval: 30s timeout: 10s retries: 3