{"id":22895570,"url":"https://github.com/0604hx/buter","last_synced_at":"2025-05-07T20:05:46.252Z","repository":{"id":70801020,"uuid":"110472531","full_name":"0604hx/buter","owner":"0604hx","description":"基于 Docker 的远程应用部署管理平台","archived":false,"fork":false,"pushed_at":"2018-03-09T06:36:50.000Z","size":4019,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T20:03:05.680Z","etag":null,"topics":["docker","flask","python3","sqlalchemy"],"latest_commit_sha":null,"homepage":"https://github.com/0604hx/buter","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0604hx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-12T21:56:35.000Z","updated_at":"2018-02-02T04:40:09.000Z","dependencies_parsed_at":"2023-08-19T22:15:06.926Z","dependency_job_id":null,"html_url":"https://github.com/0604hx/buter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0604hx%2Fbuter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0604hx%2Fbuter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0604hx%2Fbuter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0604hx%2Fbuter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0604hx","download_url":"https://codeload.github.com/0604hx/buter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252949272,"owners_count":21830151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","flask","python3","sqlalchemy"],"created_at":"2024-12-13T23:30:10.798Z","updated_at":"2025-05-07T20:05:46.244Z","avatar_url":"https://github.com/0604hx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Buter\n\u003e 基于 `Docker`  的远程应用部署管理平台\n\n注意：此项目仅为 REST Server ，需配合 [buter-admin](https://github.com/0604hx/buter-admin) 使用\n\n![structure](docs/images/structure.png)\n\n## 相关库\n\n* [Flask](https://github.com/pallets/flask)\n* [sqlalchemy](https://github.com/zzzeek/sqlalchemy)\n* [flask-sqlalchemy](https://github.com/mitsuhiko/flask-sqlalchemy)\n* [docker-py](https://github.com/docker/docker-py)\n* [Flask-APScheduler](https://github.com/viniciuschiele/flask-apscheduler)\n\n**打包**\n\n* [pyInstaller](http://www.pyinstaller.org)\n\n更多 `pyInstaller` 的说明详见[这里](https://pyinstaller.readthedocs.io/en/stable/usage.html)\n\n\n## 如何打包\n\n执行 `package.py` 即可打包（默认打包成单个可执行文件存放到 `dist` 目录，`windows` 平台为 `buter.exe`，Linux/mac OS 为 `buter`）\n\n完整的项目运行目录如下：\n\n```text\n|- static/              # 静态资源，buter-admin 项目打包后复制到此处\n|- logs/                # 日志文件\n|- buter.exe            # 主程序\n|- setting.py           # 额外的配置文件，覆盖默认配置\n```\n\n### 如何在 Ubuntu 下打包\n\u003e 下面将在 `ubuntu 16.04 64bit` 中打包， python版本为预装的 `3.5.2`\n\n1. 安装pip、virtualenv： sudo apt-get install python-pip3 \u0026\u0026 pip3 install virtualenv\n2. 创建项目专用虚拟环境（目录自定）：virtualenv buter\n3. 拉取最新的代码：git clone https://www.github.com/0604hx/buter.git\n4. 进入 buter 虚拟环境：source buter/bin/activate\n5. 进入 buter 的源码目录：cd /{YOUR_PATH_OF_BUTER_PROJECT}\n6. 安装依赖： pip3 install -r requirements.txt\n7. 执行打包：python package.py\n8. 退出虚拟环境：deactivate\n\n\n安装完成后建议执行 python run.py ，然后访问 `http://localhost:5000` 如果出现以下界面表示成功了^.^\n\n![](docs/images/server-index.png)\n\n\n### 问题汇总\n\n**windows下运行打包后exe提示：缺失 api-ms-win-crt-runtime-11-1-0.dll**\n\n参考资料：[Universal CRT not found building with Py3.5 on Win10 (Python 3.5 not usable on Windows)](https://github.com/pyinstaller/pyinstaller/issues/1566#issuecomment-146564554)\n\n原因： `windows 10`缺失的 dll 为系统自带的链接库，如果在运行时提示缺失，请安装 \n[Windows 10 Universal C Runtime](https://www.microsoft.com/en-us/download/details.aspx?id=48234)\n\n此问题暂没有很好解决，经测试在 windows10 下打包的程序可以运行在 win8/win8.1/windows 10 平台\n\n**ubuntu 下打包出现 `Unable to find \"xxx/buter/include/python3.5m/pyconfig.h\" when adding binary and data files.`的错误**\n\n黑科技：在缺失的位置创建空的 `pyconfig.h` 即可 =.=\n\n\n### 附录\n\n#### python script template\n\n```text\n# encoding: utf-8\n\n#set( $SITE = \"https://github.com/0604hx\" )\n\n\"\"\"\n@author     0604hx\n@license    MIT \n@contact    zxingming@foxmail.com\n@site       ${SITE}\n@software   ${PRODUCT_NAME}\n@project    ${PROJECT_NAME}\n@file       ${NAME}.py\n@time       ${DATE} ${TIME}\n\"\"\"\n\n\n```\n\n## LOGS\n\n### 0.0.1\n\n- [x] 环境检测（os、python、docker）\n- [x] Application 数据对象`CURD`\n- [x] 部署`Java`应用\n- [ ] 使用`https`协议: `pip install pyOpenSSL`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0604hx%2Fbuter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0604hx%2Fbuter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0604hx%2Fbuter/lists"}