承接 bricev/compolab 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bricev/compolab

Composer 安装命令:

composer require bricev/compolab

包简介

Composer Repository for GitLab

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status

CompoLab is a PHP package repository server that makes all your GitLab compliant repositories available as Composer dependencies.

In order to be registered by CompoLab, your GitLab repository must contain a valid composer.json file in the root directory.

Security disclaimer

By default, CompoLab is not secured and will let anyone access your packages. In order to secure access to your packages, you must configure your web server any way you want. Eg. you may filter with an IP whitelist, or require the use of your own self-signed SSL certificate.

Requirements

A (preferably unix) server configured with:

  • PHP 7.1 (A PHP component encounters an issue with PHP 7.2, making this code only compliant with 7.1)
  • Git / Composer
  • A web server (Nginx or Apache)
  • A working instance of GitLab (with an admin user account)

Installation

  1. From your GitLab instance, edit your own profile, then go to Access Tokens and create a token with the name of your choice (eg. CompoLab), no expiration date, and check only api and sudo scopes. If you are not an admin with a sudo token, you may be restricted in term of the groups and projects you'll be able to cache in your CompoLab repository.

  2. Run the following composer command on the server you want to use as a Composer repository: composer create-project bricev/compolab --no-dev --keep-vcs /var/www/compolab (where the last command argument is the path where you want to install CompoLab).

  3. Execute the installation script by running the command: php bin/install (from CompoLab directory). Get ready to register your GitLab URL and token during this step. Settings will be persisted in the config/settings.yml file (which is not versioned). You may use the config/settings.yml.example template to create this manually if you prefer.

  4. The web server must be properly configured to receive GitLab webhooks and receive GET /packages.json requests. The main concern is to make public/packages.json and public/archives accessible from the root of your domain (eg. https://composer.my-website.com/packages.json). All other queries must be forwarded to public/index.php. A documented Nginx configuration example can be found here: config/templates/nginx.conf.

  5. Use the cli application from your server and run the following command php bin/cli sync : this will fully synchronize your GitLab server with your CompoLab repository. Once executed, all distribution archives will be stored in the CompoLab cache and the packages.json index will be up to date.

  6. From your GitLab instance, go to the Admin Area > System hooks and configure a system hook with URL https://composer.my-website.com/gitlab (where composer.my-website.com is the domain or IP you want to use with your CompoLab instance), no secret token as you are advised to insure security at the web server level, and check only Push events, Tag push events and Enable SSL verification (if your web server is properly configured to accept SSL requests).

You're all set: your repository is complete and any future push/tag made to GitLab will be registred by CompoLab.

Usage

In order to let your local Composer installation know where to find your CompoLab repository, you need to add some configuration. You may configure your repository from your machine or directly from your package.

Local setting

You may execute the following command on your local computer/server to let Composer knows about the existance of CompoLab:

composer config -g repositories.compolab composer https://composer.my-website.com

This command should add a ~/.composer/config.json (on Unix systems) file containing the following lines:

{
    "repositories": {
        "compolab": {
            "type": "composer",
            "url": "https://composer.my-website.com"
        }
    }
}
Package setting

OR you may set the repository address directly in your package's composer.json file:

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://composer.my-website.com"
        }
    ]
}

bricev/compolab 适用场景与选型建议

bricev/compolab 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 6, 最近一次更新时间为 2019 年 01 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 bricev/compolab 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bricev/compolab 我们能提供哪些服务?
定制开发 / 二次开发

基于 bricev/compolab 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2019-01-23