Skip to content

Commit

Permalink
Merge pull request #47 from steamcmd/production
Browse files Browse the repository at this point in the history
Production changes
  • Loading branch information
jonakoudijs committed Jul 7, 2023
2 parents dd951db + 1b8b94a commit 4791119
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV WORKERS 4

# Install Python requirements
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install --no-cache-dir uvicorn \
RUN pip3 install --no-cache-dir "uvicorn[standard]" gunicorn \
&& pip3 install --no-cache-dir -r /tmp/requirements.txt \
&& rm /tmp/requirements.txt

Expand All @@ -29,4 +29,4 @@ COPY --chown=$USER:$USER src/ $HOME/
##################### INSTALLATION END #####################

# Set default container command
CMD uvicorn --host 0.0.0.0 --port $PORT --workers $WORKERS main:app
CMD gunicorn main:app --max-requests 3000 --max-requests-jitter 150 --workers $WORKERS --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT
3 changes: 3 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
image = "steamcmd/api:production"

[env]
PORT = "8000"

Expand Down

0 comments on commit 4791119

Please sign in to comment.