Update Dockerfile
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
|
@@ -1,17 +1,15 @@
|
|
| 1 |
-
# Use a lightweight Python base
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
-
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install dependencies
|
| 8 |
RUN pip install --no-cache-dir flask flask-socketio eventlet gunicorn
|
| 9 |
|
| 10 |
-
# Copy the application
|
| 11 |
COPY app.py .
|
| 12 |
|
| 13 |
-
# Expose the port
|
| 14 |
EXPOSE 7860
|
| 15 |
|
| 16 |
-
# Run
|
| 17 |
CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "--bind", "0.0.0.0:7860", "app:app"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install dependencies
|
| 6 |
RUN pip install --no-cache-dir flask flask-socketio eventlet gunicorn
|
| 7 |
|
| 8 |
+
# Copy the application
|
| 9 |
COPY app.py .
|
| 10 |
|
| 11 |
+
# Expose the port
|
| 12 |
EXPOSE 7860
|
| 13 |
|
| 14 |
+
# Run with Gunicorn/Eventlet for WebSocket support
|
| 15 |
CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "--bind", "0.0.0.0:7860", "app:app"]
|