Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
|
@@ -17,9 +17,8 @@ RUN pip install flask gunicorn pymupdf tiktoken
|
|
| 17 |
# Expose default port
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
# Run with Gunicorn (Flask / WSGI)
|
| 21 |
-
CMD ["
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
"--preload"]
|
|
|
|
| 17 |
# Expose default port
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
+
# Run with Gunicorn (Flask / WSGI) — allow $PORT expansion
|
| 21 |
+
CMD ["sh", "-c", "gunicorn app:app \
|
| 22 |
+
--bind 0.0.0.0:${PORT:-7860} \
|
| 23 |
+
--workers 1 --threads 4 --timeout 180 \
|
| 24 |
+
--access-logfile - --error-logfile - --log-level debug --preload"]
|
|
|