Skip to content

Commit 4791119

Browse files
authored
Merge pull request #47 from steamcmd/production
Production changes
2 parents dd951db + 1b8b94a commit 4791119

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV WORKERS 4
1212

1313
# Install Python requirements
1414
COPY requirements.txt /tmp/requirements.txt
15-
RUN pip3 install --no-cache-dir uvicorn \
15+
RUN pip3 install --no-cache-dir "uvicorn[standard]" gunicorn \
1616
&& pip3 install --no-cache-dir -r /tmp/requirements.txt \
1717
&& rm /tmp/requirements.txt
1818

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

3131
# Set default container command
32-
CMD uvicorn --host 0.0.0.0 --port $PORT --workers $WORKERS main:app
32+
CMD gunicorn main:app --max-requests 3000 --max-requests-jitter 150 --workers $WORKERS --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT

fly.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ kill_signal = "SIGINT"
33
kill_timeout = 5
44
processes = []
55

6+
[build]
7+
image = "steamcmd/api:production"
8+
69
[env]
710
PORT = "8000"
811

0 commit comments

Comments
 (0)