# Multi-stage Dockerfile for multiple apps FROM python:3.11-slim as base # Common dependencies WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt # Copy shared code COPY lib/ ./lib/ COPY common/ ./common/ # Flask App Stage FROM base as flask-app COPY run_cqa_test_app.py . COPY functions/ ./functions/ COPY products/ ./products/ COPY templates/ ./templates/ COPY config/ ./config/ EXPOSE 10345 CMD ["python", "run_cqa_test_app.py"] # MCP Server Stage FROM base as mcp-server COPY mcp_server.py . EXPOSE 8001 CMD ["python", "mcp_server.py"] # All-in-One Stage (both services) FROM base as all-in-one COPY . . COPY start_servers.sh . RUN chmod +x start_servers.sh EXPOSE 10345 8001 CMD ["./start_servers.sh"]