From d73225f7870f84fb165193a9066ea69b71544ccf Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Sat, 13 Apr 2024 14:17:59 +0800 Subject: [PATCH] Doc: update --- web/src/pages/Doc/en/deploy/index.md | 39 +-------------------------- web/src/pages/Doc/en/deploy/index.vue | 21 +-------------- web/src/pages/Doc/zh/deploy/index.md | 39 +-------------------------- web/src/pages/Doc/zh/deploy/index.vue | 21 +-------------- 4 files changed, 4 insertions(+), 116 deletions(-) diff --git a/web/src/pages/Doc/en/deploy/index.md b/web/src/pages/Doc/en/deploy/index.md index e160c164..9049a853 100644 --- a/web/src/pages/Doc/en/deploy/index.md +++ b/web/src/pages/Doc/en/deploy/index.md @@ -63,44 +63,7 @@ However, this requires backend support, as our application is a single page clie ## Docker -### Official image - -Starting from `v0.9.10+`, the author also provided a Docker image for use. - -```bash -docker run -d -p 8080:80 wanglin/mind-map:[version] -``` - -The version number will be consistent with the version number of the library, as shown in [changelog](/#/doc/zh/changelog). - -This image uses Nginx to deploy applications and will provide access on port 80. Page not found or 404 error will return 'index. html'. - -If you want to change to a different port or configure HTTPS, you can package the image yourself, and the 'Dockerfile' and 'nginx.conf' files are provided in the project root directory, which you can modify according to your own needs. - -Firstly, it is necessary to package the 'web' project locally: - -```bash -cd web -npm run build -``` - -Then execute the image packaging command in the project root directory: - -```bash -docker build . -t mind-map:[version] -``` - -You can modify the image name of the above command yourself. After packaging, you can run the following command to start the container: - -```bash -docker run -d -p 8080:80 mind-map:[version] -``` - -Browser input `http://localhost:8080` You can access it now. - -### Unofficial image - -> Thank you very much [水车](https://github.com/shuiche-it), This section is written by him, and the corresponding Docker package is also maintained by him. +> Thank you very much [水车](https://github.com/shuiche-it), the corresponding Docker package is maintained by him. Install directly from Docker Hub: diff --git a/web/src/pages/Doc/en/deploy/index.vue b/web/src/pages/Doc/en/deploy/index.vue index 66634f50..945f3a63 100644 --- a/web/src/pages/Doc/en/deploy/index.vue +++ b/web/src/pages/Doc/en/deploy/index.vue @@ -39,27 +39,8 @@ npm link simple-mind-map

However, this requires backend support, as our application is a single page client application. If the backend is not properly configured, users will return 404 when accessing sub routes directly in the browser. Therefore, you need to add a candidate resource on the server that covers all situations: if the 'URL' cannot match any static resources, the same 'index. html' page should be returned.

Docker

-

Official image

-

Starting from v0.9.10+, the author also provided a Docker image for use.

-
docker run -d -p 8080:80 wanglin/mind-map:[version]
-
-

The version number will be consistent with the version number of the library, as shown in changelog.

-

This image uses Nginx to deploy applications and will provide access on port 80. Page not found or 404 error will return 'index. html'.

-

If you want to change to a different port or configure HTTPS, you can package the image yourself, and the 'Dockerfile' and 'nginx.conf' files are provided in the project root directory, which you can modify according to your own needs.

-

Firstly, it is necessary to package the 'web' project locally:

-
cd web
-npm run build
-
-

Then execute the image packaging command in the project root directory:

-
docker build . -t mind-map:[version]
-
-

You can modify the image name of the above command yourself. After packaging, you can run the following command to start the container:

-
docker run -d -p 8080:80 mind-map:[version]
-
-

Browser input http://localhost:8080 You can access it now.

-

Unofficial image

-

Thank you very much 水车, This section is written by him, and the corresponding Docker package is also maintained by him.

+

Thank you very much 水车, the corresponding Docker package is maintained by him.

Install directly from Docker Hub:

docker run -d -p 8081:8080 shuiche/mind-map:latest
diff --git a/web/src/pages/Doc/zh/deploy/index.md b/web/src/pages/Doc/zh/deploy/index.md
index e83418f2..18b10183 100644
--- a/web/src/pages/Doc/zh/deploy/index.md
+++ b/web/src/pages/Doc/zh/deploy/index.md
@@ -63,44 +63,7 @@ const router = new VueRouter({
 
 ## Docker
 
-### 官方镜像
-
-从 `v0.9.10+` 开始作者也提供了一个 `docker` 镜像可供使用。
-
-```bash
-docker run -d -p 8090:80 wanglin1994/mind-map:[版本号]
-```
-
-版本号会和库的版本号保持一致,详见:[changelog](/#/doc/zh/changelog)。
-
-该镜像使用 `Nginx` 部署应用,会在 `80` 端口提供访问。页面未找到 或 404 错误会返回 `index.html`。
-
-如果你想改为其他端口,或者配置https,那么你可以自己打包镜像,项目根目录下提供了 `Dockerfile` 和 `nginx.conf` 文件,可根据自己的需求来修改。
-
-首先需要在本地打包 `web` 项目:
-
-```bash
-cd web
-npm run build
-```
-
-然后在项目根目录执行镜像打包命令:
-
-```bash
-docker build . -t mind-map:[版本号]
-```
-
-上述命令的镜像名称你可以自行修改,打包完后可以运行以下命令启动容器:
-
-```bash
-docker run -d -p 8080:80 mind-map:[版本号]
-```
-
-浏览器输入`http://localhost:8080`就能访问到了。
-
-### 非官方镜像
-
-> 非常感谢[水车](https://github.com/shuiche-it)维护的非官方镜像。
+> 非常感谢[水车](https://github.com/shuiche-it)维护的`Docker`镜像。
 
 直接从 Docker hup 中安装:
 
diff --git a/web/src/pages/Doc/zh/deploy/index.vue b/web/src/pages/Doc/zh/deploy/index.vue
index 02b6e31c..fcd39adb 100644
--- a/web/src/pages/Doc/zh/deploy/index.vue
+++ b/web/src/pages/Doc/zh/deploy/index.vue
@@ -39,27 +39,8 @@ npm link simple-mind-map
 

不过这需要后台支持,因为我们的应用是个单页客户端应用,如果后台没有正确的配置,当用户在浏览器直接访问子路由时会返回404,所以呢你要在服务端增加一个覆盖所有情况的候选资源:如果URL匹配不到任何静态资源,则应该返回同一个index.html页面。

Docker

-

官方镜像

-

v0.9.10+ 开始作者也提供了一个 docker 镜像可供使用。

-
docker run -d -p 8090:80 wanglin1994/mind-map:[版本号]
-
-

版本号会和库的版本号保持一致,详见:changelog

-

该镜像使用 Nginx 部署应用,会在 80 端口提供访问。页面未找到 或 404 错误会返回 index.html

-

如果你想改为其他端口,或者配置https,那么你可以自己打包镜像,项目根目录下提供了 Dockerfilenginx.conf 文件,可根据自己的需求来修改。

-

首先需要在本地打包 web 项目:

-
cd web
-npm run build
-
-

然后在项目根目录执行镜像打包命令:

-
docker build . -t mind-map:[版本号]
-
-

上述命令的镜像名称你可以自行修改,打包完后可以运行以下命令启动容器:

-
docker run -d -p 8080:80 mind-map:[版本号]
-
-

浏览器输入http://localhost:8080就能访问到了。

-

非官方镜像

-

非常感谢水车维护的非官方镜像。

+

非常感谢水车维护的Docker镜像。

直接从 Docker hup 中安装:

docker run -d -p 8081:8080 shuiche/mind-map:latest