Coder Social home page Coder Social logo

lxlfpeng / app-host Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pluosi/app-host

0.0 0.0 0.0 10.59 MB

应用内网发布 | iOS OTA (Over-the-Air) | APP publish website like fir.im | 适用于企业 iOS & Android 内网发布测试使用,方便管理和分发 APP 包

License: MIT License

Ruby 65.42% JavaScript 0.90% CoffeeScript 0.15% HTML 19.65% Shell 3.41% Dockerfile 0.43% SCSS 10.03%

app-host's Introduction

AppHost

MacDown logo

Build Status License Gems

介绍

一个轻量级的包托管网站,app-host 主要用于 iOS 和 Android 的包管理,作用类似于fir.im,不同之处是可以自由部署在内网,方便了公司项目保密。并且代码开源也可以方便根据各自需求进行定制化开发。

目前能实现

1.新建包
2.包底下新建渠道( iOS,安卓,各种环境都归为渠道,例如 iOS 生产,iOS 沙盒,iOS 越狱版,Android 生产等)
3.渠道下面上传包
4.帐号和权限管理
5.api 和页面表单上传包
6.解析包信息,包括 iOS 的包类型 ADHOC 还是 release,udid,安卓的签名证书等
7.我编不下去了···哈哈~~

推荐用法 Docker 公有镜像

1. mkdir ~/shared
2. docker run --name app_host -v ~/shared:/app/shared -p 3000:8686 --privileged=true -d tinyc/app-host:lastest

用法 2 Docker 自己编译

1. > git clone https://github.com/pluosi/app-host.git /opt/app-host
2. > cd /opt/app-host
5. > ./docker/launcher bootstrap -v #该步骤依赖网络,所以如果网络不稳定报错了,可以重试几次
6. > ./docker/launcher start
7. 尝试访问 http://localhost:3000 ,如果不希望用3000端口,可以手动修改 docker/launcher 里的`local_port`值
ps:数据库和上传的文件会保存在 ./shared 文件夹中

用法 3 源码运行

1. > git clone https://github.com/pluosi/app-host.git /opt/app-host
2. > cd /opt/app-host
4. 修改 config/secrets.yml 中 `production下的secret_key_base` ,可以运行`rake secret`得到
5. bundle install
6. rails s 运行测试环境
7. 关于部署到生成环境的话请参照一下 rails puma 部署等教程,需要修改一下 config/deply.rb 的部署地址
8. 尝试访问 http://localhost:3000

root账户

进入界面第一个创建的用户就是root账户

上传文件

点击账户ApiToken就可以看到相关的上传代码. 例如:

curl --form plat_id=2  --form token=e8440d867fdf92fb6f392da5e457aad530fba545  --form [email protected] http://192.168.52.128:3000/api/pkgs

plat_id是包的新建平台id

关于 https

如果需要用到ipa下载,必须配置 https,举例 ng 的配置参考

//https_app.conf
server {
    listen 443 ssl;
    server_name  ota.xxx.com;
    
    # access_log /var/log/nginx/ota.xxx.com_access.log;

    ssl_certificate      /home/xxx.com/nginx/public.pem;
    ssl_certificate_key  /home/xxx.com/nginx/private.key;
    ssl on;

    location / {
        proxy_set_header  Host $http_host;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto https;
        proxy_set_header  X-Forwarded-Port $server_port;
        proxy_pass http://172.21.35.62:3000; #此处改为 docker 服务的地址
    }
}

server {
    listen 80;
    server_name ota.xxx.com;
    rewrite ^(.*)$  https://$host$1 permanent;
}

已知问题

  1. apk 包如果是非图片 logo,会无法显示 logo,因为目前还没实现 xml logo 的解析
  2. 如果不配置 https,ipa 将无法安装(苹果的限制)

License

AppHost is released under the MIT license. See LICENSE for details.

联系作者

MacDown logo

预览

MacDown logo

MacDown logo

MacDown logo

app-host's People

Contributors

lxlfpeng avatar tinyc-z avatar yaming116 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.