You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by im...@apache.org on 2022/10/13 11:17:38 UTC

[shenyu-website] 01/01: Update deployment-docker.md

This is an automated email from the ASF dual-hosted git repository.

impactcn pushed a commit to branch impactCn-patch-2
in repository https://gitbox.apache.org/repos/asf/shenyu-website.git

commit ac45d4700645632524b9f98b772d8d8865f0a33e
Author: Sinsy <55...@qq.com>
AuthorDate: Thu Oct 13 19:17:33 2022 +0800

    Update deployment-docker.md
---
 .../version-2.5.0/deployment/deployment-docker.md  | 33 +++++++++++++++++-----
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/deployment/deployment-docker.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/deployment/deployment-docker.md
index 1b8d5bce956..8e86ec6f754 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/deployment/deployment-docker.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.0/deployment/deployment-docker.md
@@ -19,43 +19,62 @@ description: docker部署
 * 使用 `h2` 来存储后台数据:
 
 ```
-> docker run -d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
+> docker run -d -p 9095:9095 \
+--net shenyu apache/shenyu-admin:${current.version}
 ```
 
 * 使用 `MySQL` 来存储后台数据, 按照 [指引文档](./deployment-before.md#mysql) 初始化数据库, 将 [mysql-connector.jar](https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.29/mysql-connector-java-8.0.29.jar) 拷贝到 `/${your_work_dir}/ext-lib`:
 
 ```
-docker run -v /${your_work_dir}/ext-lib:/opt/shenyu-admin/ext-lib -e "SPRING_PROFILES_ACTIVE=mysql" -e "spring.datasource.url=jdbc:mysql://${your_ip_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull" -e "spring.datasource.username=${your_username}" -e "spring.datasource.password=${your_password}" -d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
+docker run -v /${your_work_dir}/ext-lib:/opt/shenyu-admin/ext-lib \
+-e "SPRING_PROFILES_ACTIVE=mysql" \
+-e "spring.datasource.url=jdbc:mysql://${your_ip_port}/shenyu?useUnicode=true&characterEncoding=utf8 \
+&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull" \
+-e "spring.datasource.username=${your_username}" \
+-e "spring.datasource.password=${your_password}" \
+-d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
 ```
 
 另外一种方式, 从 [配置文件地址](https://github.com/apache/incubator-shenyu/blob/master/shenyu-admin/src/main/resources/) 中把 `application.yml`、`application-mysql.yml`、`application-pg.yml`、`application-oracle.yml` 配置放到`${your_work_dir}/conf` , 调整`application.yml`中的配置`spring.profiles.active = mysql`,然后执行以下语句:
 
 ```          
-docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf -v /${your_work_dir}/ext-lib:/opt/shenyu-admin/ext-lib -d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
+docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf \
+-v /${your_work_dir}/ext-lib:/opt/shenyu-admin/ext-lib \
+-d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
 ```
 
 * 使用 `PostgreSql` 来存储后台数据, 按照 [指引文档](./deployment-before.md#postgresql) 初始化数据库, 执行以下语句:
 
 ```
-docker run -e "SPRING_PROFILES_ACTIVE=pg" -e "spring.datasource.url=jdbc:postgresql://${your_ip_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false" -e "spring.datasource.username=${your_username}" -e "spring.datasource.password=${your_password}" -d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
+docker run -e "SPRING_PROFILES_ACTIVE=pg" \
+-e "spring.datasource.url=jdbc:postgresql://${your_ip_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false" \
+-e "spring.datasource.username=${your_username}" \
+-e "spring.datasource.password=${your_password}" \
+-d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
 ```
 
 另外一种方式, 从 [配置文件地址](https://github.com/apache/incubator-shenyu/blob/master/shenyu-admin/src/main/resources/) 中把 `application.yml`、`application-mysql.yml`、`application-pg.yml`、`application-oracle.yml` 配置放到`${your_work_dir}/conf`, 调整`application.yml`中的配置`spring.profiles.active = pg`,然后执行以下语句:
 
 ```
-docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf -d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
+docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf \
+-d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
 ```
 
 * 使用 `Oracle` 来存储后台数据, 按照 [指引文档](./deployment-before.md#oracle) 初始化数据库, 执行以下语句:
 
 ```
-docker run -e "SPRING_PROFILES_ACTIVE=oracle" -e "spring.datasource.url=jdbc:oracle:thin:@localhost:1521/shenyu" -e "spring.datasource.username=${your_username}" -e "spring.datasource.password=${your_password}" -d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
+docker run -e "SPRING_PROFILES_ACTIVE=oracle" \
+-e "spring.datasource.url=jdbc:oracle:thin:@localhost:1521/shenyu" \
+-e "spring.datasource.username=${your_username}" \
+-e "spring.datasource.password=${your_password}" \
+-d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
 ```
 
 另外一种方式, 从 [配置文件地址](https://github.com/apache/incubator-shenyu/blob/master/shenyu-admin/src/main/resources/) 中把 `application.yml`、`application-mysql.yml`、`application-pg.yml`、`application-oracle.yml` 配置放到`${your_work_dir}/conf`, 调整`application.yml`中的配置`spring.profiles.active = oracle`,然后执行以下语句:
 
 ```
-docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf -d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
+docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf \
+-d -p 9095:9095 --net shenyu apache/shenyu-admin:${current.version}
 ```
 
 ### 启动Apache ShenYu Bootstrap