gunicorn: add config file.

This commit is contained in:
evazion
2022-06-21 00:32:56 -05:00
parent 1d238f3466
commit 5c90c7378d
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -33,4 +33,4 @@ EXPOSE 5000
ENTRYPOINT ["tini", "--", "poetry", "run"]
#CMD ["autotag"]
#CMD ["flask", "run", "--host", "0.0.0.0"]
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:5000"]
CMD ["gunicorn"]
+11
View File
@@ -0,0 +1,11 @@
from os import getenv
from distutils.util import strtobool
wsgi_app = "app:app"
bind = getenv("GUNICORN_BIND", "0.0.0.0:5000")
workers = int(getenv("GUNICORN_WORKERS", 1))
threads = int(getenv("GUNICORN_THREADS", 4))
accesslog = getenv("GUNICORN_ACCESSLOG", "-")
errorlog = getenv("GUNICORN_ERRORLOG", "-")
loglevel = getenv("GUNICORN_LOGLEVEL", "info")
preload_app = bool(strtobool(getenv("GUNICORN_PRELOAD", "True")))