# ============================================================================ # Blockchain Worker Dockerfile # ============================================================================ # Lightweight service for handling blockchain operations # Delegates compute-intensive crypto operations from the main API FROM python:3.12-slim WORKDIR /app # Copy requirements from backend COPY backend/requirements.txt . # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy backend modules (for crypto imports) COPY backend /app/backend # Copy worker service COPY blockchain-worker /app/blockchain-worker # Set working directory WORKDIR /app/blockchain-worker # Health check HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ CMD python -c "import requests; requests.get('http://localhost:8001/health')" || exit 1 # Start worker CMD ["python", "worker.py"]