Git Product home page Git Product logo

buter's Introduction

Buter

基于 Docker 的远程应用部署管理平台

注意:此项目仅为 REST Server ,需配合 buter-admin 使用

structure

相关库

打包

更多 pyInstaller 的说明详见这里

如何打包

执行 package.py 即可打包(默认打包成单个可执行文件存放到 dist 目录,windows 平台为 buter.exe,Linux/mac OS 为 buter

完整的项目运行目录如下:

|- static/              # 静态资源,buter-admin 项目打包后复制到此处
|- logs/                # 日志文件
|- buter.exe            # 主程序
|- setting.py           # 额外的配置文件,覆盖默认配置

如何在 Ubuntu 下打包

下面将在 ubuntu 16.04 64bit 中打包, python版本为预装的 3.5.2

  1. 安装pip、virtualenv: sudo apt-get install python-pip3 && pip3 install virtualenv
  2. 创建项目专用虚拟环境(目录自定):virtualenv buter
  3. 拉取最新的代码:git clone https://www.github.com/0604hx/buter.git
  4. 进入 buter 虚拟环境:source buter/bin/activate
  5. 进入 buter 的源码目录:cd /{YOUR_PATH_OF_BUTER_PROJECT}
  6. 安装依赖: pip3 install -r requirements.txt
  7. 执行打包:python package.py
  8. 退出虚拟环境:deactivate

安装完成后建议执行 python run.py ,然后访问 http://localhost:5000 如果出现以下界面表示成功了^.^

问题汇总

windows下运行打包后exe提示:缺失 api-ms-win-crt-runtime-11-1-0.dll

参考资料:Universal CRT not found building with Py3.5 on Win10 (Python 3.5 not usable on Windows)

原因: windows 10缺失的 dll 为系统自带的链接库,如果在运行时提示缺失,请安装 Windows 10 Universal C Runtime

此问题暂没有很好解决,经测试在 windows10 下打包的程序可以运行在 win8/win8.1/windows 10 平台

ubuntu 下打包出现 Unable to find "xxx/buter/include/python3.5m/pyconfig.h" when adding binary and data files.的错误

黑科技:在缺失的位置创建空的 pyconfig.h 即可 =.=

附录

python script template

# encoding: utf-8

#set( $SITE = "https://github.com/0604hx" )

"""
@author     0604hx
@license    MIT 
@contact    [email protected]
@site       ${SITE}
@software   ${PRODUCT_NAME}
@project    ${PROJECT_NAME}
@file       ${NAME}.py
@time       ${DATE} ${TIME}
"""


LOGS

0.0.1

  • 环境检测(os、python、docker)
  • Application 数据对象CURD
  • 部署Java应用
  • 使用https协议: pip install pyOpenSSL

buter's People

Contributors

0604hx avatar

Stargazers

 avatar  avatar

Watchers

 avatar

buter's Issues

请问如何在docker里面运行cron?

请问一下使用Flask-APScheduler创建了cron的定时任务后,如何在docker里面运行,我的flask用docker-compose up运行后,发现APScheduler不会启动?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.