From 4c23c2838e1eae35a18bfc6916d987afb7b87745 Mon Sep 17 00:00:00 2001 From: liyang <2234333815@qq.com> Date: Sun, 21 Apr 2024 15:51:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=A8=8B=E5=BA=8F=E5=9C=A8?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E8=BF=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dockerfile | 6 +++--- requirements.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dockerfile b/dockerfile index afea54d..cd0b4f4 100644 --- a/dockerfile +++ b/dockerfile @@ -10,8 +10,8 @@ COPY . /app # 安装项目依赖 RUN pip install -r requirements.txt -# 暴露Flask应用程序所使用的端口 -EXPOSE 5000 +# 暴露所使用的端口 +EXPOSE 8000 # 启动Flask应用程序 -CMD ["python", "app.py"] +CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "app:app"] diff --git a/requirements.txt b/requirements.txt index 1f009d5..2764be1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ flask_paginate jieba wordcloud xlwt +gunicorn