-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9334df3
commit 09096ca
Showing
8 changed files
with
941 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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
# 空内容分支 | ||
# gh-oauth-server | ||
|
||
用于初始化一个例子分支 | ||
[gitment](https://github.com/imsun/gitment)依赖的中介服务.用于 | ||
|
||
## 特性 | ||
|
||
+ 这个image包含对linux-arm64,linux-amd64和linux-arm/v7的支持. | ||
|
||
+ 支持健康检测 | ||
|
||
+ 默认端口在3000 | ||
|
||
```sh | ||
$ npm start | ||
``` |
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,10 @@ | ||
docker buildx build --load --platform=linux/arm64 -t hsz1273327/gh-oauth-server:arm64-0.0.2 -t hsz1273327/gh-oauth-server:arm64-latest . | ||
docker buildx build --load --platform=linux/amd64 -t hsz1273327/gh-oauth-server:amd64-0.0.2 -t hsz1273327/gh-oauth-server:amd64-latest . | ||
docker buildx build --load --platform=linux/arm/v7 -t hsz1273327/gh-oauth-server:armv7-0.0.2 -t hsz1273327/gh-oauth-server:armv7-latest . | ||
docker push hsz1273327/gh-oauth-server | ||
|
||
docker manifest create --amend hsz1273327/gh-oauth-server:0.0.2 hsz1273327/gh-oauth-server:arm64-0.0.2 hsz1273327/gh-oauth-server:amd64-0.0.2 hsz1273327/gh-oauth-server:armv7-0.0.2 | ||
docker manifest push --purge hsz1273327/gh-oauth-server:0.0.2 | ||
|
||
docker manifest create --amend hsz1273327/gh-oauth-server:latest hsz1273327/gh-oauth-server:arm64-latest hsz1273327/gh-oauth-server:amd64-latest hsz1273327/gh-oauth-server:armv7-latest | ||
docker manifest push --purge hsz1273327/gh-oauth-server:latest |
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,10 @@ | ||
docker buildx build --load --platform=linux/arm64 -t hsz1273327/gh-oauth-server:arm64-0.0.2 -t hsz1273327/gh-oauth-server:arm64-latest . | ||
docker buildx build --load --platform=linux/amd64 -t hsz1273327/gh-oauth-server:amd64-0.0.2 -t hsz1273327/gh-oauth-server:amd64-latest . | ||
docker buildx build --load --platform=linux/arm/v7 -t hsz1273327/gh-oauth-server:armv7-0.0.2 -t hsz1273327/gh-oauth-server:armv7-latest . | ||
docker push hsz1273327/gh-oauth-server | ||
|
||
docker manifest create --amend hsz1273327/gh-oauth-server:0.0.2 hsz1273327/gh-oauth-server:arm64-0.0.2 hsz1273327/gh-oauth-server:amd64-0.0.2 hsz1273327/gh-oauth-server:armv7-0.0.2 | ||
docker manifest push --purge hsz1273327/gh-oauth-server:0.0.2 | ||
|
||
docker manifest create --amend hsz1273327/gh-oauth-server:latest hsz1273327/gh-oauth-server:arm64-latest hsz1273327/gh-oauth-server:amd64-latest hsz1273327/gh-oauth-server:armv7-latest | ||
docker manifest push --purge hsz1273327/gh-oauth-server:latest |
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,10 @@ | ||
version: "2.4" | ||
services: | ||
gh-oauth-server: | ||
image: hsz1273327/gh-oauth-server:amd64-latest | ||
ports: | ||
- 9527:3000 | ||
cpu_percent: 20 | ||
mem_limit: 200m | ||
memswap_limit: 300m | ||
restart: on-failure |
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,12 @@ | ||
FROM --platform=$TARGETPLATFORM node:latest | ||
|
||
ADD server.js /app/server.js | ||
ADD package.json /app/package.json | ||
WORKDIR /app | ||
#安装依赖 | ||
RUN npm config set registry https://registry.npm.taobao.org | ||
RUN npm install | ||
#对外暴露的端口 | ||
EXPOSE 3000 | ||
HEALTHCHECK --interval=1m30s --timeout=10s --start-period=10s --retries=3 CMD [ "curl","http://localhost:3000/ping" ] | ||
CMD [ "npm","start"] |
Oops, something went wrong.