Skip to content

Commit

Permalink
配置程序在生产环境运行
Browse files Browse the repository at this point in the history
  • Loading branch information
electronic-pig committed Apr 21, 2024
1 parent d93cbd1 commit 4c23c28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ flask_paginate
jieba
wordcloud
xlwt
gunicorn

0 comments on commit 4c23c28

Please # to comment.