Commit 8d56baf4 authored by Christian Elberfeld's avatar Christian Elberfeld

gunicorn based docker

parent 0883bf1b
...@@ -13,8 +13,7 @@ RUN pip3 install --upgrade pip ...@@ -13,8 +13,7 @@ RUN pip3 install --upgrade pip
RUN pip3 install \ RUN pip3 install \
flask==1.0.2 \ flask==1.0.2 \
flask_mqtt \ flask_mqtt \
pytz \ gunicorn \
uwsgi \
--upgrade --upgrade
# start Script # start Script
......
...@@ -5,4 +5,5 @@ export FLASK_APP=warpapi.py ...@@ -5,4 +5,5 @@ export FLASK_APP=warpapi.py
export FLASK_ENV=production export FLASK_ENV=production
cd /opt/warpapi/ cd /opt/warpapi/
uwsgi --uid=www-data --gid=www-data --socket 0.0.0.0:5000 --protocol=http -w wsgi:app exec gunicorn -b :5000 warpapi:app
#flask run --host=0.0.0.0
import datetime
import pytz
from flask import Flask from flask import Flask
from flask import request from flask import request
from flask import redirect from flask import redirect
......
from warpapi import app
if __name__ == "__main__":
app.run()
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment