Skip to content

Latest commit

 

History

History
77 lines (66 loc) · 1.42 KB

2.composer私有企业库.md

File metadata and controls

77 lines (66 loc) · 1.42 KB

安装

cd /data/satis
composer create-project composer/satis --stability=dev --keep-vcs
cd satis

去gitlab建立私有版本库,定义composer.json,commit同时push到gitlab

vim satis.json;编辑json文件

{
    "name": "com",
    "homepage": "http://www.jhq0113.com",
    "repositories": [
        {"type": "vcs", "url": "https://github.com/bambooleaf/reps_demo.git"}
    ],
    "require":{
        "com/com":"*"
    },
    "archive":{
        "directory":"dist",
        "format":"tar",
        "prefix-url":"http://www.jhq0113.com",
        "skip-dev":false
    }
}

生成

php bin/satis build satis.json public/

配置nginx

server {
    listen  80;
    server_name www.jhq0113.com;
    root /data/satis/public;
    index index.php index.html;
    access_log off;
    rewrite_log off;
    
    location = /favicon.ico {
            log_not_found off;
            access_log off;
    }
}

使用

{
    "repositories":[
        {
          "type": "composer",
          "url": "http://www.jhq0113.com"
        }
      ],
      "config":{
        "secure-http":false
      }
}

更新

php bin/satis build satis.json public/