Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
soapmancn authored Aug 12, 2024
1 parent 03fab69 commit 7f04ac0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ WORKDIR /app
COPY . /app

# 安装所需的依赖
RUN pip install --no-cache-dir flask
RUN pip install --no-cache-dir flask gunicorn

# 设置环境变量,指定 Flask 应用入口文件
ENV FLASK_APP=app.py

EXPOSE 5500

# 声明启动时执行的命令
CMD ["flask", "run", "--host=0.0.0.0", "--port=5500", "--without-threads"]
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5500", "app:app"]

0 comments on commit 7f04ac0

Please sign in to comment.