GithubHelp home page GithubHelp logo

banbendalao / server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dupdatesystem/server

0.0 1.0 0.0 613 KB

Update Server on server

License: GNU General Public License v3.0

Python 96.71% Dockerfile 0.68% Shell 2.62%

server's Introduction

standard-readme compliant

UpgradeAll 服务端代码仓库

该项目旨在为 UpgradeAll 项目 提供数据支持。 它由以下部分构成

  1. 服务端主体。
  2. 软件源脚本仓库。

内容列表

背景

UpgradeAll 服务端 最开始因为 @yah 在维护脚本时发觉本地爬虫的效率问题而被提出,并于 0.1.2 版本(客户端版本)的开发阶段实现。

安装

这个项目使用 Python 3。请确保你本地安装了它们。

TIPS:gRPC proto 编译命令(在 server 目录下执行):

python -m grpc_tools.protoc -I./ --python_out=. --grpc_python_out=. ./app/grpc_template/route.proto

使用说明

克隆仓库,这样你就可以开始使用该项目了

$ git clone --depth=1 https://github.com/DUpdateSystem/Server.git
# 获取你的调试/开发的基础环境
$ cd server
# 进入 Server 主体代码文件夹

运行这个项目

Podman/Docker

$ podman pull docker.io/xiangzhedev/upgradeall-server
# 更新镜像
$ podman run --rm -p 5255:5255 xiangzhedev/upgradeall-server
# 单次运行
$ podman run --rm -v $PWD/app:/app -p 5255:5255 xiangzhedev/upgradeall-server
# 测试运行(在该项目的根目录下运行)
$ podman run --rm -p 5255:5255 xiangzhedev/upgradeall-server --help
# 查看参数帮助
$ podman run -dit --restart unless-stopped --name=update-server -d -p 5255:5255 xiangzhedev/upgradeall-server
# 服务部署
$ podman stop update-server && podman container rm update-server
# 停止服务

已安装 Docker 的 Linux 环境

$ ./startup.sh --help
# 查看使用帮助
# 使用 debug 模式运行时,将直接挂载 app 文件夹到相关目录下,因此,在修改本项目代码时,请尽管测试你的代码。

手动安装并运行(适用于 Termux)

因为我没有 Windows 开发环境,所以我只以 Linux 作为示例,命令可能不完全相同

$ pip3 install -r app/requirements.txt
# 安装 Python 依赖
$ python3 -m app --help
# 查看命令帮助

示例

Podman/Docker

$ podman run -dit --restart unless-stopped --name=update-server -d -p 5255:5255 xiangzhedev/upgradeall-server
# 服务部署
$ podman run --rm xiangzhedev/upgradeall-server --debug 6a6d590b-1809-41bf-8ce3-7e3f6c8da945 --test_options android_app_package com.nextcloud.client
# 测试软件源

Shell script

不推荐使用 该脚本只用于调试,脚本会自动本地编译新的 Docker 镜像并挂载代码文件夹以便调试

$ ./startup.sh
# 部署服务端
$ ./startup.sh --debug 6a6d590b-1809-41bf-8ce3-7e3f6c8da945 --test_options android_app_package com.nextcloud.client
# 测试软件源

手动运行

$ python3 -m app
# 部署服务端
$ python3 -m app --debug 6a6d590b-1809-41bf-8ce3-7e3f6c8da945 --test_options android_app_package com.nextcloud.client
# 测试软件源

命令参数

usage: DUpdateSystem Server [-h] [--normal] [--debug] [--init_account] [--test_options [TEST_OPTIONS ...]] [hub_uuid]

DUpdateSystem 服务端

positional arguments:
  hub_uuid              测试的软件源脚本的 UUID

optional arguments:
  -h, --help            show this help message and exit
  --normal              以 config.ini 配置正常运行服务端
  --debug               运行软件源脚本测试
  --init_account        测试的软件源脚本的帐号初始化函数
  --test_options [TEST_OPTIONS ...]
                        测试软件源脚本的运行选项,以 key value 为组,例如:android_app_package net.xzos.upgradeall

相关仓库

维护者

@xz-dev

如何贡献

非常欢迎你的加入!官方文档-参与我们
你已经有一个明确的想法了?请 提一个 Issue 或者提交一个 Pull Request。

使用许可

GPL-3.0 © xz-dev

server's People

Contributors

xz-dev avatar wangxiaoeryah avatar kevinzonda avatar oevery avatar

Watchers

 avatar

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.