Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -57,10 +57,11 @@ COPY . .
|
|
| 57 |
# Writable caches
|
| 58 |
RUN mkdir -p /cache/hf /tmp && chmod -R 777 /cache /tmp
|
| 59 |
|
| 60 |
-
ENV PORT=8000
|
| 61 |
-
EXPOSE
|
| 62 |
|
| 63 |
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
| 64 |
-
CMD curl -fsS "http://127.0.0.1:${PORT}/health" || exit 1
|
| 65 |
|
| 66 |
-
|
|
|
|
|
|
| 57 |
# Writable caches
|
| 58 |
RUN mkdir -p /cache/hf /tmp && chmod -R 777 /cache /tmp
|
| 59 |
|
| 60 |
+
#ENV PORT=8000
|
| 61 |
+
EXPOSE 7860
|
| 62 |
|
| 63 |
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
| 64 |
+
CMD curl -fsS "http://127.0.0.1:${PORT}/health/" || exit 1
|
| 65 |
|
| 66 |
+
# ✅ bind to $PORT provided by HF; include proxy headers
|
| 67 |
+
CMD ["sh","-c","uvicorn backend:app --host 0.0.0.0 --port ${PORT} --proxy-headers --forwarded-allow-ips='*'"]
|