satis 搭建 Composer 私有库的方法

安装 satis

命令行下执行: php create-project composer/satis --stability=dev --keep-vcs 。

配置

创建 satis.json 文件,如官方示例:

{
"name": "My Repository",
"homepage": "http://packages.example.org",
"repositories": [
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo" },
{ "type": "vcs", "url": "http://svn.example.org/private/repo" },
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo2" }
],
"require-all": true
}

reposiories 数组改成公司内网各个使用 composer 自动加载项目的地址,注意 URL中需要带 .git 。

构建

进入 satis 目录,使用如下命令构建 satis web站点: php bin/satis build satis.json public 。

注: composer的 repo.packagist 配置项如果采用的是国内的镜像地址,可能上面的 build 语句会失败,需要暂时去掉镜像配置,linux 下可直接编辑 ~/.config/composer/config.json 文件去掉,windows 下的操作同理;由于自建的 composer 私有库使用的是 HTTP 协议,而默认 composer 要求必须使用 HTTPS 协议,故 composer create-project 时,必须指定 no-secure-http 参数,或者在配置项指定参数 "secure-http": false 。

WEB 站点搭建

使用 apache/nginx 或 php -S 命令创建 WEB 站点,文档根目录指向 satis/public 目录。

使用 satis 私有库 composer create-project

假设上面配置的 web 站点地址是 http://127.0.0.1 ,则可使用如下命令创建composer项目:

composer create-project vendor/project --no-secure-http --no-interaction --repository=http://127.0.0.1

或者配置下以下选项:

composer config -g secure-http false
composer config -g repo.my_repo composer http://127.0.0.1

然后,以后只需要使用下面的命令安装:

composer create-project vendor/project -n
composer.json 中指定要包含的私有composer项目:

通过 repositories 配置项指定私有composer库的地址,指定后就可以在 require 中使用私有 composer 项目了。

{
"repositories": [
{ "type": "composer", "url": "http://127.0.0.1/" }
],
"require": [
...
],
...
}

The package PHP Web Site Compare Files is one of the few PHP packages that was considerednotable recently because it does something that is worth paying attention.

The basic purpose is: Compare the list of files of two Web sites

Here follows in more detail what it does:

This class can compare the list of files of two Web sites.

It can take the URLs of two sites and compares the list of files between them.

The class uses file_list.php script that needs to be installed on both site servers, so it can use that script to retrieve the files list.

The class displays a report of the files that are missing or changed between servers, as well the respective modification dates and sizes.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to thePHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages considersharing them, so you can also earn more visibility for your package.

You need to be aregistered user orlogin to post a comment

1,403,024 PHP developers registered to the PHP Classes site.

Be One of Us!

时间: 2024-08-08 01:27:57

satis 搭建 Composer 私有库的方法的相关文章

在 Docker 搭建 Maven 私有库

在 Docker 搭建 Maven 私有库 小引 If you are developing software without a repository manager you are likely missing a number of opportunities to reduce some pretty obvious inefficiencies. If everyone on your team has to hit public repositories like the Centr

本地搭建CNPM私有库

主要是玩玩CNPM私有库,理解里面的原理,有助于部署到服务器上和使用私用库来管理代码. 一.环境准备: 1.Windows操作系统: 2.MySQL数据库(支持'mysql', 'sqlite', 'postgres', 'mariadb'.这里选择MySQL) 3.CNMP私有库源码(https://github.com/cnpm/cnpmjs.org) 二.搭建系统 CNPM源码目录结构 1.将docs文件夹里面的db.sql部署到MySQL中: 开启MySQL->打开GUI界面->创建一

使用 satis 搭建 composer 本地仓库

环境 windows nginx php composer 安装 拉取 satis 项目包,并拉取项目依赖 composer create-project composer/satis --stability=dev cd satis composer install 配置 修改 satis/config.json 文件,文件内容如下 { "name": "composer 本地仓库", "homepage": "http://pack

创业公司十分钟简单搭建GIT私有库

一.背景 小公司,协同开发的人不多,建gitlab比较麻烦,只需要在Server端建立一个简单的git共享库就OK. 二.建立仓库 Server端: 1.在Server端建立项目目录.mkdir sample 2.在sample中执行git -bare init,生成sample.git目录,这个目录是个共享库,所有代码在该目录下. 本地端: 1.clone远程共享库,目前还是空的:git clone [email protected]:/home/project/sample.git 2.本地

cocoapods管理私有库

参考文章 http://www.cocoachina.com/ios/20150228/11206.html http://blog.csdn.net/yohunl/article/details/48471489 准备工作 1.有自己的git仓库 2.需要管理的私有库 在git服务器上新建一个私有库MyPrivateCocoaRepo $pod repo add MyPrivateCocoaRepo https://git.oschina.net/huanghehg/MyPrivateCoco

ubuntu npm 私有库搭建 (npmjs.org 官方版本)

目标 npm.xxx.com 安装和推送nodejs包 npmui.xxx.com 管理已经推送的nodejs包 安装 couchdb https://launchpad.net/~couchdb/+archive/ubuntu/stable 里面有 14.10  14.04 和 12.04的   PPA地址 安装不在这里讨论 安装 couchdb 1.6.1 1.初始化 访问“http://localhost:5984/_utils/” 新建名字为  registry 库 异步 同步官方nod

docker搭建harbor私有镜像库

创建harbor私有镜像库 一.部署准备: harbor软件包 在部署节点上: 1)解压harbor的软件包将harbor目录下所有文件发送到/opt/目录下 tar zxvf harbor-offline-installer-v1.4.0.tgz [[email protected] kubernetes]# cd harbor [[email protected] harbor]# ls common docker-compose.notary.yml ha harbor.v1.4.0.ta

Nuget私有库搭建 打包依赖问题

之前就有在公司做私有库的搭建: 1.直接写个bat 命令,在VS中配制菜单,可在项目上右键发布.(网上很多这种教程) 1.1 版本号问题无语 1.2 项目多了也是无语 2.之前的技术群友推荐用了一个工具NuPack的VS插件 可能是我太菜,不太会用,还是觉得麻烦,项目多了,一起打包累 3.就是脚本了,这个方便,快,还打包的全 看了很多网上的资料,就第三种最好用,小改一下就能通吃 网上遇到最多的问题就是 打包后 没有把依赖也一起打包,这就是个坑 我找了很久,被自己蠢屎,还是要多看官网文档. 就是看

iOS代码组件化--利用cocoaPods创建私有库

如果项目模块多,模块间逻辑复杂,我们发现多个人同时维护一个代码仓库需要十分小心,一不小心,造成冲突,解决起来很烦,相信很多人都遇到手工删除合并的冲突的文件的经历. 如果利用组件化思想,每个人维护自己的模块对应的代码库,将会大大降低冲突的风险,而且组件化能够很好的给工程解耦. 组件化的第一步就是创建自己的仓库,公司的话需要搭建并维护私有库. 1.查看本地索引库 我们用cocoaPods 的时候,默认使用的是cocoaPods自带的索引库 终端中使用命令 $ pod repo 查看有哪些索引库,这里