diff --git a/Dockerfile b/Dockerfile index eb4072a..ed8370b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re RUN apk add git python3 py3-pip 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 -RUN pip3 install waitress +COPY ./project /web-gpt/project +RUN pip3 install -r /web-gpt/project/requirements.txt CMD cd /web-gpt && waitress-serve --listen 0.0.0.0:5000 project:app \ No newline at end of file diff --git a/project/__init__.py b/project/__init__.py index 2090848..4444dd0 100644 --- a/project/__init__.py +++ b/project/__init__.py @@ -6,6 +6,7 @@ import logging import time import traceback import os +import waitress # init SQLAlchemy so we can use it later in our models db = SQLAlchemy() diff --git a/requirements.txt b/project/requirements.txt similarity index 87% rename from requirements.txt rename to project/requirements.txt index e184a48..6d63962 100644 --- a/requirements.txt +++ b/project/requirements.txt @@ -4,4 +4,5 @@ flask_sqlalchemy==3.0.3 openai==0.27.2 PyYAML==6.0 SQLAlchemy==2.0.7 +waitress==2.1.2 Werkzeug==2.2.3