Skip to content

Commit

Permalink
Commit current prod config
Browse files Browse the repository at this point in the history
  • Loading branch information
jonakoudijs committed Apr 12, 2023
1 parent 2f516d3 commit a7226ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ ENV USER steamcmd
ENV HOME /data

ENV PORT 8000
ENV WORKERS 4
ENV WORKERS 2

################## BEGIN INSTALLATION ######################

# 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 5000 --max-requests-jitter 200 --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 a7226ec

Please sign in to comment.