From 06ca07283c1a8c449a87fbfab21a4169c16c7b1f Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Mon, 3 Feb 2025 15:34:00 -0500 Subject: [PATCH] port] --- Dockerfile | 5 +++-- api/api.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 42f69b3..f79aa3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /app # Copy the requirements file first for dependency caching COPY api/requirements.txt . + # Install build dependencies, then install Python dependencies, and finally remove build tools RUN apt-get update && \ apt-get install -y --no-install-recommends gcc build-essential && \ @@ -27,7 +28,7 @@ RUN adduser --disabled-password --gecos "" appuser && \ USER appuser # Expose port 80 for the application -EXPOSE 80 +EXPOSE 8080 # Start the API using Gunicorn with Uvicorn workers -CMD ["gunicorn", "api:app", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:80"] +CMD ["gunicorn", "api:app", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8080"] diff --git a/api/api.py b/api/api.py index dccc110..5d44fa6 100644 --- a/api/api.py +++ b/api/api.py @@ -377,7 +377,7 @@ def delete_swarm(swarm_id: str, current_user: str = Depends(get_current_user)) - if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8000, reload=True) + uvicorn.run(app, host="0.0.0.0", port=8080, reload=True) # ------------------------------------------------------------------------------ # To run the application: #