GithubHelp home page GithubHelp logo

satis's Introduction

satis

php composer的satis docker

编译镜像

 docker build -t satis ./

运行docker

docker run  --name satis \
-v /your_satis_path/disk:/app/satis/web/disk/ \
-v /your_satis_path/config:/app/config/ \
--privileged=true \
-d satis

在satis里添加包(添加require部分):

# 该功能是将项目composer.json中的require部分合并到satis.json里,需要指定satis.json,composer.json的位置
/app/composer-satis-builder/bin/merge-requirements 

vi /app/composer-satis-builder/bin/merge-requirements 

#! /bin/bash
php composer-satis-builder build ./satis.json ./composer.json --merge-requirements

#建议将satis.json,composer.json都放放在/app/config里

在satis里添加库(添加repositories部分,目前只支持git):

/app/composer-satis-builder/bin/merge-requirements git::http://your-gitlab/xx/yy.git

# 同样需要指定satis.json,composer.json的位置
#! /bin/bash
php composer-satis-builder buil ./satis.json  --merge-repositories=$1
~

生成索引

/app/config/reBuildIndex
# 同样需要指定satis.json,composer.json的位置

其他

  • 部分回源到github,可能需要输入账号密码,建议将id_rsa传到doker里~/.ssh下
  • 依赖较多的包,比如laraval要运行很久,这是正常现象。
  • 包索引文件较多时,php会报错,
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)

在/app/satis/bin/satis 第3行下插入代码:

ini_set("memory_limit", -1);# docker里已经默认加上了这一步,如果被操作系统Killed,需要调小,一般2G比较合适
  • 手动运行创建新的索引脚本,没有像其他docker那样加到crontab里。
  • require-dev-dependencies=true时,会解析require-dev的包,有些应用包已经在github.com删除了,会导致建立索引失败,脚本自动退出(阿里云,腾讯云也有404的包)。
  • 创建索引,到最后可能会失败,根据php报错修改响应代码即可

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.