Skip to content

Commit

Permalink
Merge pull request #30 from icowan/master
Browse files Browse the repository at this point in the history
调整dockerfile
  • Loading branch information
icowan authored Oct 16, 2019
2 parents 9c95256 + 88da508 commit 47702ae
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM kplcloud/gitbook:v3.2.3 AS build_env
FROM kplcloud/gitbook:v3.2.3-191016 AS build_env

MAINTAINER dudulu <[email protected]>

Expand Down
14 changes: 14 additions & 0 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:10.16.3-alpine AS build_env

MAINTAINER dudulu <[email protected]>

RUN npm config set registry https://registry.npm.taobao.org

RUN npm install -g gitbook-cli github highlight search mygitalk copy-code-button code expandable-chapters back-to-top-button sharing-plus
RUN mkdir -p /opt/data
COPY ./README.md /opt/data
WORKDIR /opt/data
RUN gitbook fetch 3.2.3
RUN gitbook build

CMD ["bash"]
13 changes: 13 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM docker-prod-virtual.repo.yrd.creditease.corp/gitbook:v3.2.3 AS build_env

COPY ./ /opt/gitbook

WORKDIR /opt/gitbook

RUN gitbook build

FROM nginx:1.17.3-alpine

COPY --from=build_env /opt/gitbook/_book/ /usr/share/nginx/html/

CMD ["nginx", "-g", "daemon off;"]
14 changes: 11 additions & 3 deletions book.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"plugins": ["github", "highlight", "search", "mygitalk", "copy-code-button", "code", "expandable-chapters", "back-to-top-button",
"plugins": ["donate", "github", "highlight", "search", "mygitalk", "copy-code-button", "code", "expandable-chapters", "back-to-top-button",
"-sharing", "sharing-plus"],
"pluginsConfig": {
"sharing": {
Expand All @@ -19,6 +19,14 @@
"github": {
"url": "https://github.com/kplcloud/cloud-website.git"
},
"mygitalk": { "clientID": "f9c7497acefb210b7b1b", "clientSecret": "4cf66cb16ee3138910ce5839aeace57c94c43404", "repo": "cloud-website", "owner": "icowan", "admin": ["icowan"], "distractionFreeMode": false }
}
"mygitalk": { "clientID": "f9c7497acefb210b7b1b", "clientSecret": "4cf66cb16ee3138910ce5839aeace57c94c43404", "repo": "cloud-website", "owner": "icowan", "admin": ["icowan"], "distractionFreeMode": false },
"donate": {
"wechat": "https://lattecake.oss-cn-beijing.aliyuncs.com/static%2Fimages%2Freward%2Fweixin-RMB-xxx.JPG",
"alipay": "https://lattecake.oss-cn-beijing.aliyuncs.com/static%2Fimages%2Freward%2Falipay-RMB-xxx.png",
"title": "深情按压, 小额赞赏, 您的赞赏就是我更新的动力。",
"button": "打赏",
"alipayText": "支付宝捐赠",
"wechatText": "微信捐赠"
}
}
}

0 comments on commit 47702ae

Please sign in to comment.