Update Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -4,16 +4,17 @@ FROM python:3.11-slim
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy
|
| 8 |
COPY webhook_handler.py .
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
|
| 11 |
-
# Install dependencies
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt && \
|
| 13 |
-
pip install --no-cache-dir requests
|
| 14 |
|
| 15 |
-
# Expose the port the webhook server
|
| 16 |
EXPOSE 8000
|
| 17 |
|
| 18 |
-
# Command to run the
|
| 19 |
-
CMD ["
|
|
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy application and test files
|
| 8 |
COPY webhook_handler.py .
|
| 9 |
+
COPY test_webhook_and_start.py .
|
| 10 |
COPY requirements.txt .
|
| 11 |
|
| 12 |
+
# Install dependencies, including pytest for testing
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt && \
|
| 14 |
+
pip install --no-cache-dir requests pytest
|
| 15 |
|
| 16 |
+
# Expose the port for the webhook server (optional, for manual testing)
|
| 17 |
EXPOSE 8000
|
| 18 |
|
| 19 |
+
# Command to run the test suite
|
| 20 |
+
CMD ["pytest", "test_webhook_and_start.py", "-v"]
|