diff --git a/Dockerfile b/Dockerfile index ff9d0c4..27285f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 \ No newline at end of file +CMD gunicorn main:app --max-requests 3000 --max-requests-jitter 150 --workers $WORKERS --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT \ No newline at end of file diff --git a/fly.toml b/fly.toml index 0a13224..dcf8bbd 100644 --- a/fly.toml +++ b/fly.toml @@ -3,6 +3,9 @@ kill_signal = "SIGINT" kill_timeout = 5 processes = [] +[build] + image = "steamcmd/api:production" + [env] PORT = "8000"