11.26 优化日志管理
This commit is contained in:
parent
3f33820797
commit
e9d4452764
@ -22,7 +22,7 @@ ENV PYTHONPATH=/flask_project:$PYTHONPATH
|
||||
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 5001
|
||||
EXPOSE 5000
|
||||
|
||||
# 在容器启动时运行你的应用
|
||||
CMD ["python", "flask_app/start_up.py"]
|
||||
|
@ -4,7 +4,7 @@ services:
|
||||
context: . # 构建上下文为当前目录
|
||||
dockerfile: Dockerfile # 指定 Dockerfile
|
||||
ports:
|
||||
- "5001:5001" # 将容器的5001端口映射到主机的5001端口
|
||||
- "5000:5000" # 将容器的5000端口映射到主机的5000端口
|
||||
env_file:
|
||||
- .env # 使用 .env 文件中的环境变量
|
||||
volumes:
|
||||
|
@ -64,4 +64,4 @@ def create_app():
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = create_app()
|
||||
app.run(debug=True, host='0.0.0.0', port=5001)
|
||||
app.run(debug=True, host='0.0.0.0', port=5000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user