| # Use the official Python slim image to keep the image size small | |
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /pipecat | |
| # Copy application and test files | |
| COPY webhook_handler.py . | |
| COPY test_pipecat_phone_chatbot.py . | |
| COPY requirements.txt . | |
| # Install dependencies, including pytest for testing | |
| RUN pip install --no-cache-dir -r requirements.txt && \ | |
| pip install --no-cache-dir requests pytest | |
| # Expose the port for the webhook server (optional, for manual testing) | |
| EXPOSE 8000 | |
| # Command to run the test suite with verbose output | |
| CMD ["pytest", "test_pipecat_phone_chatbot.py", "-v", "--log-file=/app/test.log", "--log-file-level=INFO"] |