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!
satis 搭建 Composer 私有库的方法的更多相关文章
- Satis搭建composer私有库(自定义下载目录)
在我们的日常php开发中需要使用大量的第三方包和类库, 怎么管理是一个问题, 我们用的Yii2框架, 但是并没有把composer用起来, 由于最近更换为docker部署项目, 于是想起来用compo ...
- 在 Docker 搭建 Maven 私有库
在 Docker 搭建 Maven 私有库 小引 If you are developing software without a repository manager you are likely ...
- docker学习---搭建Docker私有库及删除库内镜像
环境准备系统: cat /etc/redhat-release CentOS Linux release (Core) 主机两台,分别是docker私有库服务器(IP 192.168.121.121) ...
- 使用 satis 搭建 composer 本地仓库
环境 windows nginx php composer 安装 拉取 satis 项目包,并拉取项目依赖 composer create-project composer/satis --stabi ...
- 创业公司十分钟简单搭建GIT私有库
欢迎关注老码农的微信公共账号,与CSDN博客同步 一.背景 小公司.协同开发的人不多,建gitlab比較麻烦,仅仅须要在Server端建立一个简单的git共享库就OK. 二.建立仓库 Server端: ...
- maven私有库搭建
一.在企业中基本上都会有自己的maven私有库,主要的目的就是方便依赖包的下载.如果采用远程的方式来实现的话,很多时候会考虑网速问题.如果自己活着公司搭建的私有库,这一样在使用上面会效率更高. 二.私 ...
- 安装Maven并搭建Maven私有仓库
一.说明 Maven是基于项目对象模型(POM),可以通过一小段描述信息来管理项目的构建,报告和文档的软件项目管理工具.我们在进行Java代码开发的时候,Eclipse+Maven+Jetty是一个十 ...
- Dubbo入门到精通学习笔记(四):持续集成管理平台之Maven私有库和本地库的安装与配置
文章目录 介绍 Maven私有库和本地库的安装与配置 Nexus安装 Nexus 配置(登录后) 介绍 如果构建的Maven项目本地仓库没有对应的依赖包,那么就会去Nexus私服去下载, 那么如果Ne ...
- 使用 satis 搭建一个私有的 Composer 包仓库
在我们的日常php开发中可能需要使用大量的composer包,大部份都可以直接使用,但在公司内部总有一小部份包是不能公开的,这时候我们就需要搭建一个公司内部使用的composer仓库,好在compos ...
随机推荐
- CSS For Bar Graphs(maybe old)
Having a working knowledge of XHTML and CSS when developing applications is a big help in knowing wh ...
- Leetcode: Mini Parser
Given a nested list of integers represented as a string, implement a parser to deserialize it. Each ...
- Java基础(9):Java生成随机数一定范围内的数的一个典型例子
题目:编写一个JAVA程序,创建指定长度的 int 型数组,并生成 100 以内随机数为数组中的每个元素赋值,然后输出数组 note: 通过 (int)(Math.random() * 100) 生成 ...
- logstash5.x改变
5.x版本 logstash中 elasticsearch插件的workers,无法配置大于1,会提示 This plugin uses the shared and doesn't need thi ...
- 夺命雷公狗—angularjs—9—ng-class的自定义函数的用法
angularjs里面其实给我们留下了一个很不错的地方,他就是可以直接调用函数从而对该位置进行处理, 被点击后展示效果如下所示: 开始走代码吧.... <!doctype html> &l ...
- access调用联系
using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; us ...
- 【py分析】使用SGMLParser分析淘宝html
SGMLParser Python 默认自带 HTMLParser 以及 SGMLParser 等等解析器,前者实在是太难用了,我就用 SGMLParser 写了一个示例程序: import urll ...
- 最懂中文的H5前端框架amazeUI
Amaze UI 是一个轻量级(所有 CSS 和 JS gzip 后 100 kB 左右)的前端框架, 基于开源社区流行前端框架编写 amazeUI的网址:http://amazeui.org/get ...
- jQuery基础之让出$,与其他库共存
在某些情况下,可能有必要在同一个页面中使用多个JS库,由于很多库都使用$标识符(因为他简短方便),因此就需要一种方式来避免名称冲突. 为解决这个问题,jQuery提供了一个名叫.noConflict( ...
- 【转】“C语言说到底是一门以内存为中心的编程语言” —— 这种说法正确吗?
转自:http://weibo.com/1005903613/AAgqA3kb4 LAW张粑粑的微博