Skip to content

Commit

Permalink
UPD: use uvicorn to run app without gunicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
nandyalu committed Aug 3, 2024
1 parent db41eb3 commit e31ba6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Stage 1 - Python dependencies
FROM python:3.12-slim AS python-deps

# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1

# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# PYTHONDONTWRITEBYTECODE=1 -> Keeps Python from generating .pyc files in the container
# PYTHONUNBUFFERED=1 -> Turns off buffering for easier container logging
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1

# Install pip requirements
COPY ./backend/requirements.txt .
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ alembic upgrade head && echo "Database migrations ran successfully!"
# Start FastAPI application
echo "Starting Trailarr application"
cd /app
exec gunicorn --bind 0.0.0.0:7889 -k uvicorn.workers.UvicornWorker backend.main:trailarr_api
exec uvicorn backend.main:trailarr_api --host 0.0.0.0 --port 7889

0 comments on commit e31ba6c

Please sign in to comment.