Skip to content

Commit

Permalink
port]
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegomez committed Feb 3, 2025
1 parent bafb82c commit 06ca072
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand Down

0 comments on commit 06ca072

Please sign in to comment.