Skip to content

Commit 06a4ed6

Browse files
authored
Update deploy (#25)
1 parent b289d83 commit 06a4ed6

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

deploy.md

+44-10
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ server {
7878
## Netlify
7979

8080
1. 登陆你的[Netlify](https://www.netlify.com/)账号
81-
2. 在[dashboard](https://app.netlify.com/)页上点击 **New site from Git**.
82-
3. 选择那个你用来存储文档的git仓库,将 **Build Command** 留空, 将 **Publish directory** 区域填入你的`index.html`所在的目录,例如:填入`docs`(如果你的`index.html`的相对路径是`docs/index.html`的话).
81+
2. 在[dashboard](https://app.netlify.com/)页上点击 **New site from Git**
82+
3. 选择那个你用来存储文档的git仓库,将 **Build Command** 留空, 将 **Publish directory** 区域填入你的`index.html`所在的目录,例如:填入`docs`(如果你的`index.html`的相对路径是`docs/index.html`的话)
8383

8484
### HTML5 路由
8585

@@ -93,7 +93,7 @@ server {
9393

9494
1. 安装 [Now CLI](https://zeit.co/download) : `npm i -g now`
9595
2. 切换到你的 docsify 网站的文档目录,例如 `cd docs`
96-
3. 用一个指令来部署: `now`
96+
3. 用一个指令来部署: `now`
9797

9898
## AWS Amplify
9999

@@ -118,7 +118,7 @@ version: 0.1
118118
frontend:
119119
phases:
120120
build:
121-
commands:
121+
commands:
122122
- echo "Nothing to build"
123123
artifacts:
124124
baseDirectory: /docs
@@ -134,13 +134,47 @@ frontend:
134134
|----------------|----------------|---------------|
135135
| /<*>.md | /<*>.md | 200 (Rewrite) |
136136
| /<*>.png | /<*>.png | 200 (Rewrite) |
137-
| /<*> | /index.html | 200 (Rewrite) |
137+
| /<*> | /index.html | 200 (Rewrite) |
138138

139-
## 21云盒子
139+
## Docker
140140

141-
1. 在 [21云盒子](https://www.21yunbox.com) 中, 创建一个新的 `静态网页` ,使用以下配置部署:
141+
- 创建 docsify 的文件
142142

143-
- 构建命令:` `
144-
- 发布目录:填写为你的 docsify 网站的文档目录,例如 `./docs`
143+
你需要准备好初始文件,而不是在容器中制作。
144+
请参阅 [快速开始](https://docsify.js.org/#/zh-cn/quickstart) 部分,了解如何手动或使用 [docsify-cli](https://github.com/docsifyjs/docsify-cli) 创建这些文件。
145145

146-
2. 点击 "部署" 按钮!
146+
```sh
147+
index.html
148+
README.md
149+
```
150+
151+
- 创建 Dockerfile
152+
153+
```Dockerfile
154+
FROM node:latest
155+
LABEL description="A demo Dockerfile for build Docsify."
156+
WORKDIR /docs
157+
RUN npm install -g docsify-cli@latest
158+
EXPOSE 3000/tcp
159+
ENTRYPOINT docsify serve .
160+
```
161+
162+
创建成功后当前的目录结构应该是这样的:
163+
164+
```sh
165+
index.html
166+
README.md
167+
Dockerfile
168+
```
169+
170+
- 构建 docker 镜像
171+
172+
```sh
173+
docker build -f Dockerfile -t docsify/demo .
174+
```
175+
176+
- 运行 docker 镜像
177+
178+
```sh
179+
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
180+
```

0 commit comments

Comments
 (0)