Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

利用 composer 來整合分散的工具 #1

Open
LeoOnTheEarth opened this issue Jan 12, 2014 · 0 comments
Open

利用 composer 來整合分散的工具 #1

LeoOnTheEarth opened this issue Jan 12, 2014 · 0 comments

Comments

@LeoOnTheEarth
Copy link
Contributor

可以考慮自己架設一個私有的 Packagist
(參考資料: http://getcomposer.org/doc/articles/handling-private-packages-with-satis.md)

目前初步的實驗結果是利用 Satis 這個 CLI 工具產生 Packagist 需要的檔案
產生出來的都是靜態檔案,包括 index.htmlpackages.json
檔案內容範例可參考 http://leo.ipharmacy.com.tw/packagist

composer.json 的範例

{
    "repositories": [
        {
            "type": "composer",
            "url": "http://leo.ipharmacy.com.tw/packagist"
        }
    ],
    "require": {
        "gourrymk2/cuttle": "dev-dev",
        "guzzle/guzzle": "*",
        "silex/silex": "*"
    },
    "minimum-stability": "dev"
}

之後使用 composer install 安裝

實驗後發現可以直接使用官方 Packagist 的 package (如範例中的 silex/silex)
所以官方和私有 package 是可以混雜使用的

由於 Satis 產生的都是靜態檔案
這些檔案可以佈署到 Amazon S3 上
不需要放到特定的機器裡
這部分需要做一些 DNS 的設定和寫一支自動化佈署的 PHP 程式

先討論看這個方案適不適合

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant