-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #530 from khs1994-docker/dev
Support satis #479
- Loading branch information
Showing
10 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
workspace: | ||
base: /data/lnmp | ||
|
||
pipeline: | ||
test: | ||
image: khs1994/php-fpm:7.2.6-alpine3.7 | ||
command: | ||
- ./lnmp-docker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
!.env.* | ||
!my_second_app | ||
!my_other_app | ||
!satis-demo |
Submodule demo
updated
5 files
+3 −1 | .khsci.php | |
+3 −1 | README.example.md | |
+6 −4 | composer.demo.json | |
+5 −3 | composer.json | |
+1 −1 | phpunit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Composer 私有化解决方案 Satis | ||
|
||
* 问题反馈 https://github.com/khs1994-docker/lnmp/issues/479 | ||
|
||
* https://github.com/composer/satis | ||
|
||
* https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md#satis | ||
|
||
## GitGub API 等的频率限制 | ||
|
||
```bash | ||
Could not fetch https://api.github.com/repos/khs1994-docker/libdocker, please create a GitHub OAuth token to go over the API rate limit | ||
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+7b6ead567709+2018-05-29+1134 | ||
to retrieve a token. It will be stored in "/composer/auth.json" for future use by Composer. | ||
Token (hidden): | ||
``` | ||
|
||
加上 `token` 解除限制 | ||
|
||
* https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens | ||
|
||
生成 `token` 之后,在提示处粘贴 `token` 回车即可。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "My Composer", | ||
"homepage": "http://packagist.example.com", | ||
"repositories": [{ | ||
"type": "vcs", | ||
"url": "https://github.com/khs1994-docker/libdocker" | ||
}, | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/khs1994-docker/libregistry" | ||
}, | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/khs1994-php/tencent-ai" | ||
} | ||
], | ||
"require-all": true, | ||
"archive": { | ||
"directory": "dist", | ||
"format": "tar", | ||
"skip-dev": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ complete -W "acme.sh \ | |
restart \ | ||
registry \ | ||
registry-down \ | ||
satis \ | ||
ssl \ | ||
ssl-self \ | ||
swarm-build \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ Commands: | |
restart Restart LNMP services | ||
registry Start Docker Registry | ||
registry-down Stop Docker Registry | ||
satis Build Satis | ||
update Upgrades LNMP | ||
upgrade Upgrades LNMP | ||
update-version Update LNMP soft to latest vesion | ||
|
@@ -226,6 +227,15 @@ When Docker for Desktop Start Kubernetes Success, you must remove this local ser | |
" | ||
} | ||
|
||
_satis(){ | ||
if ! [ -d app/satis ];then | ||
cp -r app/satis-demo app/satis | ||
print_warning "Please modify app/satis/satis.json\n" | ||
fi | ||
|
||
docker run --rm -it -v $PWD/app/satis:/build -v lnmp_composer_cache-data:/composer composer/satis | ||
} | ||
|
||
_local_docs_server(){ | ||
if ! [ -d app/khsdocs/k8s ];then | ||
git clone --depth=1 -b gh-pages [email protected]:khs1994-website/kubernetes-handbook.git app/khsdocs/k8s | ||
|
@@ -1137,6 +1147,11 @@ For information please run $ docker service update --help | |
" | ||
;; | ||
|
||
satis ) | ||
_satis | ||
|
||
;; | ||
|
||
build ) | ||
run_docker | ||
init | ||
|