diff --git a/.coze b/.coze new file mode 100644 index 0000000..29798cc --- /dev/null +++ b/.coze @@ -0,0 +1,10 @@ +[project] +requires = ["python-3.12"] + +[dev] +build = ["pip", "install", "-r", "requirements.txt"] +run = ["python", "app.py"] + +[deploy] +build = ["pip", "install", "-r", "requirements.txt"] +run = ["python", "app.py"] diff --git a/app.py b/app.py index 1be909f..73069d9 100644 --- a/app.py +++ b/app.py @@ -467,6 +467,8 @@ print('定时任务已启动:每天 08:01 执行') # ==================== 启动应用 ==================== if __name__ == '__main__': - port = int(os.environ.get('PORT', 5000)) + # 支持沙箱环境和本地环境 + port = int(os.environ.get('DEPLOY_RUN_PORT', os.environ.get('PORT', 5000))) print(f'启动服务器: http://localhost:{port}') + print(f'数据库: {os.environ.get("DB_HOST", "haoslm2.xicp.net")}:{os.environ.get("DB_PORT", "10216")}') app.run(host='0.0.0.0', port=port, debug=True) \ No newline at end of file diff --git a/assets/image.png b/assets/image.png new file mode 100644 index 0000000..7f66a99 Binary files /dev/null and b/assets/image.png differ