철스토리

Composer private packagist 구축하기 본문

서버설정/우분투 서버설정

Composer private packagist 구축하기

HyunChol 2020. 12. 16. 11:21
반응형

Satis 서버

 

Satis 받기

php /usr/local/bin/composer create-project composer/satis --stability=dev --keep-vcs

 

satis.json 파일 생성

{
  "name": "Private Packagist",
  "homepage": "https://111.222.111.222/", // 직접만든 IP주소 또는 Domain
  "repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/johyunchol/php-gson2.git"
    }
  ],
  "require-all": true
}

 

web디렉토리에 build

php bin/satis build satis.json web

 

web디렉토리를 Apache에서 보게함

 

----------------

 

클라이언트

 

composer.json 에 repositories 추가

{
    "repositories": [
        {
            "type": "composer",
            "url": "http://111.222.111.222" // 직접만든 사설 저장소 주소
        }
    ],
}

 

사설 저장소에 올린 패키지 받기

{
	"require": {
    	"johyunchol/php-gson2": "^v0.2.1"
    }
}

--------------------------------------------

composer require johyunchol/php-gson2


 

 

참고자료

www.youtube.com/watch?v=WYfWo5wVnJY

github.com/composer/satis

 

composer/satis

Simple static Composer repository generator - For a full private Composer repo use Private Packagist - composer/satis

github.com

github.com/xpressengine/Composer-korean-docs/blob/master/KR/05-repositories.md

 

xpressengine/Composer-korean-docs

Composer 의 한글 메뉴얼입니다. Contribute to xpressengine/Composer-korean-docs development by creating an account on GitHub.

github.com

 

반응형
Comments