start server with waitress

This commit is contained in:
wangjiacai 2023-04-08 10:41:13 +08:00
parent 6dcf5d757a
commit c4800ddf55
2 changed files with 5 additions and 1 deletions

View File

@ -6,4 +6,5 @@ RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN python3 -m pip install --upgrade pip && pip3 install --upgrade setuptools
COPY . /web-gpt
RUN pip3 install -r /web-gpt/requirements.txt
CMD cd /web-gpt && flask --app=project run --host=0.0.0.0
RUN pip3 install waitress
CMD cd /web-gpt && waitress-serve --listen 0.0.0.0:5000 project:app

View File

@ -45,3 +45,6 @@ def create_app():
app.register_blueprint(main_blueprint)
return app
app = create_app()