Using gunicorn to run upto 4 workers. This should fix the problems of the whole program crashing.

This commit is contained in:
2022-04-16 07:57:18 +05:30
parent c494284517
commit 3eaf4cd41d
5 changed files with 125 additions and 1 deletions

View File

@ -50,4 +50,4 @@ RUN chmod 777 /app/docker-entrypoint.sh \
&& ln -s /app/docker-entrypoint.sh /
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["poetry", "run", "python", "-m", "barker"]
CMD ["poetry", "run", "gunicorn", "app.main:app", "--worker-class", "uvicorn.workers.UvicornWorker", "--config", "/app/gunicorn.conf.py", "--log-config", "/app/logging.conf"]