Spaces:
Sleeping
Sleeping
Update port
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -7,7 +7,7 @@ WORKDIR /app
|
|
| 7 |
# Set environment variables
|
| 8 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 9 |
PYTHONUNBUFFERED=1 \
|
| 10 |
-
PORT=
|
| 11 |
|
| 12 |
# Install system dependencies
|
| 13 |
RUN apt-get update && apt-get install -y \
|
|
@@ -30,11 +30,11 @@ RUN useradd --create-home --shell /bin/bash app && \
|
|
| 30 |
USER app
|
| 31 |
|
| 32 |
# Expose port
|
| 33 |
-
EXPOSE
|
| 34 |
|
| 35 |
# Health check
|
| 36 |
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
| 37 |
-
CMD curl -f http://localhost:
|
| 38 |
|
| 39 |
# Run the application
|
| 40 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "
|
|
|
|
| 7 |
# Set environment variables
|
| 8 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 9 |
PYTHONUNBUFFERED=1 \
|
| 10 |
+
PORT=7860
|
| 11 |
|
| 12 |
# Install system dependencies
|
| 13 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 30 |
USER app
|
| 31 |
|
| 32 |
# Expose port
|
| 33 |
+
EXPOSE 7860
|
| 34 |
|
| 35 |
# Health check
|
| 36 |
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
| 37 |
+
CMD curl -f http://localhost:7860/ || exit 1
|
| 38 |
|
| 39 |
# Run the application
|
| 40 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|