diff --git a/Dockerfile b/Dockerfile index 374272a..ed6f7b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,6 @@ WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt COPY . . -CMD ["python", "app.py"] +RUN bash lego.sh +#CMD ["python", "app.py"] +CMD ["gunicorn","--bind","0.0.0.0:3333","app:app","--worker-class","eventlet"] diff --git a/app.py b/app.py index 2759f11..4030837 100644 --- a/app.py +++ b/app.py @@ -11,6 +11,7 @@ import re #regex import rebrick #rebrickable api import requests # request img from web import shutil # save img locally +import eventlet app = Flask(__name__) socketio = SocketIO(app) @@ -763,4 +764,4 @@ def save_number(tmp): return Response(status=204) if __name__ == '__main__': - socketio.run(app.run(host='0.0.0.0', debug=True, port=3333)) + socketio.run(app.run(host='0.0.0.0', debug=False, port=3333))