Doc: update

This commit is contained in:
wanglin2
2024-04-12 23:08:33 +08:00
parent 5730a7aed5
commit 11b3270314
4 changed files with 20 additions and 14 deletions

View File

@@ -68,12 +68,14 @@ However, this requires backend support, as our application is a single page clie
Starting from `v0.9.10+`, the author also provided a Docker image for use.
```bash
docker run -d -p 8080:80 wanglin/mind-map:latest
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'.
You can also 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.
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:
@@ -85,13 +87,13 @@ npm run build
Then execute the image packaging command in the project root directory:
```bash
docker build . -t mind-map:0.9.10
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:0.9.10
docker run -d -p 8080:80 mind-map:[version]
```
Browser input `http://localhost:8080` You can access it now.

View File

@@ -41,19 +41,20 @@ npm link simple-mind-map
<h2>Docker</h2>
<h3>Official image</h3>
<p>Starting from <code>v0.9.10+</code>, the author also provided a Docker image for use.</p>
<pre class="hljs"><code>docker run -d -p 8080:80 wanglin/mind-map:latest
<pre class="hljs"><code>docker run -d -p 8080:80 wanglin/mind-map:[version]
</code></pre>
<p>The version number will be consistent with the version number of the library, as shown in <a href="/#/doc/zh/changelog">changelog</a>.</p>
<p>This image uses Nginx to deploy applications and will provide access on port 80. Page not found or 404 error will return 'index. html'.</p>
<p>You can also 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.</p>
<p>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.</p>
<p>Firstly, it is necessary to package the 'web' project locally:</p>
<pre class="hljs"><code><span class="hljs-built_in">cd</span> web
npm run build
</code></pre>
<p>Then execute the image packaging command in the project root directory:</p>
<pre class="hljs"><code>docker build . -t mind-map:0.9.10
<pre class="hljs"><code>docker build . -t mind-map:[version]
</code></pre>
<p>You can modify the image name of the above command yourself. After packaging, you can run the following command to start the container:</p>
<pre class="hljs"><code>docker run -d -p 8080:80 mind-map:0.9.10
<pre class="hljs"><code>docker run -d -p 8080:80 mind-map:[version]
</code></pre>
<p>Browser input <code>http://localhost:8080</code> You can access it now.</p>
<h3>Unofficial image</h3>

View File

@@ -68,9 +68,11 @@ const router = new VueRouter({
`v0.9.10+` 开始作者也提供了一个 `docker` 镜像可供使用。
```bash
docker run -d -p 8080:80 wanglin/mind-map:latest
docker run -d -p 8090:80 wanglin1994/mind-map:[版本号]
```
版本号会和库的版本号保持一致,详见:[changelog](/#/doc/zh/changelog)。
该镜像使用 `Nginx` 部署应用,会在 `80` 端口提供访问。页面未找到 或 404 错误会返回 `index.html`
如果你想改为其他端口或者配置https那么你可以自己打包镜像项目根目录下提供了 `Dockerfile``nginx.conf` 文件,可根据自己的需求来修改。
@@ -85,13 +87,13 @@ npm run build
然后在项目根目录执行镜像打包命令:
```bash
docker build . -t mind-map:0.9.10
docker build . -t mind-map:[版本号]
```
上述命令的镜像名称你可以自行修改,打包完后可以运行以下命令启动容器:
```bash
docker run -d -p 8080:80 mind-map:0.9.10
docker run -d -p 8080:80 mind-map:[版本号]
```
浏览器输入`http://localhost:8080`就能访问到了。

View File

@@ -41,8 +41,9 @@ npm link simple-mind-map
<h2>Docker</h2>
<h3>官方镜像</h3>
<p> <code>v0.9.10+</code> 开始作者也提供了一个 <code>docker</code> 镜像可供使用</p>
<pre class="hljs"><code>docker run -d -p 8080:80 wanglin/mind-map:latest
<pre class="hljs"><code>docker run -d -p 8090:80 wanglin1994/mind-map:[版本号]
</code></pre>
<p>版本号会和库的版本号保持一致详见<a href="/#/doc/zh/changelog">changelog</a></p>
<p>该镜像使用 <code>Nginx</code> 部署应用会在 <code>80</code> 端口提供访问页面未找到 404 错误会返回 <code>index.html</code></p>
<p>如果你想改为其他端口或者配置https那么你可以自己打包镜像项目根目录下提供了 <code>Dockerfile</code> <code>nginx.conf</code> 文件可根据自己的需求来修改</p>
<p>首先需要在本地打包 <code>web</code> 项目</p>
@@ -50,10 +51,10 @@ npm link simple-mind-map
npm run build
</code></pre>
<p>然后在项目根目录执行镜像打包命令</p>
<pre class="hljs"><code>docker build . -t mind-map:0.9.10
<pre class="hljs"><code>docker build . -t mind-map:[版本号]
</code></pre>
<p>上述命令的镜像名称你可以自行修改打包完后可以运行以下命令启动容器</p>
<pre class="hljs"><code>docker run -d -p 8080:80 mind-map:0.9.10
<pre class="hljs"><code>docker run -d -p 8080:80 mind-map:[版本号]
</code></pre>
<p>浏览器输入<code>http://localhost:8080</code>就能访问到了。</p>
<h3>非官方镜像</h3>