Changed Dockerfile to gunicorn with uvicorn workers

This commit is contained in:
Carlos-Mesquita
2024-11-06 16:19:19 +00:00
parent a2e96f8e54
commit c9e293fb11

View File

@@ -38,4 +38,4 @@ EXPOSE 8000
# For environments with multiple CPU cores, increase the number of workers
# to be equal to the cores available.
# Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.
CMD exec uvicorn --bind 0.0.0.0:8000 --workers 1 --threads 8 --timeout 0 app.server:app
ENTRYPOINT ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "1", "--threads", "8", "--timeout", "0", "-k", "uvicorn.workers.UvicornWorker", "app.server:app"]