add gunicorn 2
This commit is contained in:
parent
e15c6e4727
commit
1950d759ba
3 changed files with 6 additions and 5 deletions
|
@ -19,4 +19,6 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"]
|
||||
|
||||
#CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"]
|
||||
CMD [ "python3", "-m" , "gunicorn", "app:app", "-c", "gunicorn_config.py"]
|
||||
|
|
3
gunicorn_config.py
Normal file
3
gunicorn_config.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
bind = "0.0.0.0:5000"
|
||||
workers = 2
|
||||
threads = 4
|
4
wsgi.py
4
wsgi.py
|
@ -1,4 +0,0 @@
|
|||
from app import app
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
Reference in a new issue