You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by mi...@apache.org on 2021/11/02 05:22:33 UTC
[incubator-shenyu-website] branch main updated: [DOC #339] Add
deployment documentation for PostgreSql support in version 2.4.1. (#340)
This is an automated email from the ASF dual-hosted git repository.
midnight2104 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git
The following commit(s) were added to refs/heads/main by this push:
new d8b02bf [DOC #339] Add deployment documentation for PostgreSql support in version 2.4.1. (#340)
d8b02bf is described below
commit d8b02bf786cc06b9f33ddd618a71b5a47481c7af
Author: Shawn Jim <32...@users.noreply.github.com>
AuthorDate: Tue Nov 2 13:22:26 2021 +0800
[DOC #339] Add deployment documentation for PostgreSql support in version 2.4.1. (#340)
---
docs/deployment/deployment-docker.md | 12 ++++++++++++
docs/deployment/deployment-local.md | 2 ++
docs/deployment/deployment-package.md | 8 ++++++++
.../version-2.4.1/deployment/deployment-docker.md | 12 ++++++++++++
.../version-2.4.1/deployment/deployment-local.md | 2 ++
.../version-2.4.1/deployment/deployment-package.md | 8 ++++++++
6 files changed, 44 insertions(+)
diff --git a/docs/deployment/deployment-docker.md b/docs/deployment/deployment-docker.md
index d84ed09..f12491f 100644
--- a/docs/deployment/deployment-docker.md
+++ b/docs/deployment/deployment-docker.md
@@ -32,6 +32,18 @@ another way is to put the `application.yml` configuration in ${your_work_dir}/co
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
```
+* use `PostgreSql` to store data, execute the following statement:
+
+```
+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
+```
+
+another way is to put the `application.yml` configuration in ${your_work_dir}/conf, and then execute the following statement:
+
+```
+docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf/ -d -p 9095:9095 --net shenyu apache/shenyu-admin
+```
+
### Start Apache ShenYu Bootstrap
```
diff --git a/docs/deployment/deployment-local.md b/docs/deployment/deployment-local.md
index e8f9176..44adf8d 100644
--- a/docs/deployment/deployment-local.md
+++ b/docs/deployment/deployment-local.md
@@ -29,6 +29,8 @@ This article introduces how to start the `Apache ShenYu` gateway in the local en
* If you use `h2` to store, set the variable `--spring.profiles.active = h2`.
* If you use `MySQL` for storage, modify the `mysql` configuration in `application.yaml`.
+
+ * If you use `PostgreSql` for storage, modify the `pg` of `spring.profiles.active` configuration in `application.yaml`.
* use the development tool to start `org.apache.shenyu.bootstrap.ShenyuBootstrapApplication`.
diff --git a/docs/deployment/deployment-package.md b/docs/deployment/deployment-package.md
index d9ff76c..f3d2fbb 100644
--- a/docs/deployment/deployment-package.md
+++ b/docs/deployment/deployment-package.md
@@ -30,6 +30,14 @@ This article introduces the deployment of the `Apache ShenYu` gateway using the
> linux: ./start.sh
```
+* use `PostgreSql` to store data, go to the `/conf` directory, and modify `spring.profiles.active` of the configuration in `application.yaml` to `pg`.
+
+```
+> windows: start.bat
+
+> linux: ./start.sh
+```
+
### Start Apache ShenYu Bootstrap
* download `apache-shenyu-incubating-2.4.0-bootstrap-bin.tar.gz`
diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-docker.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-docker.md
index 67e3e76..3de123c 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-docker.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-docker.md
@@ -32,6 +32,18 @@ docker run -v /${your_work_dir}/ext-lib:/opt/shenyu-admin/ext-lib -e "SPRING_PRO
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
```
+* 使用 `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
+```
+
+另外一种方式把 `application.yml` 配置放到`${your_work_dir}/conf`, 然后执行以下语句:
+
+```
+docker run -v ${your_work_dir}/conf:/opt/shenyu-admin/conf/ -d -p 9095:9095 --net shenyu apache/shenyu-admin
+```
+
### 启动Apache ShenYu Bootstrap
```
diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-local.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-local.md
index d331c10..56567aa 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-local.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-local.md
@@ -29,6 +29,8 @@ description: 本地部署
* 如果使用`h2`来存储,设置变量 `--spring.profiles.active = h2`
* 如果使用`MySQL`来存储,修改 `application.yaml` 中的 `mysql` 配置。
+
+ * 如果使用`PostgreSql`来存储,修改 `application.yaml` 中的 `spring.profiles.active` 配置为 `pg`。
* 使用开发工具启动 `org.apache.shenyu.bootstrap.ShenyuBootstrapApplication`。
diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-package.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-package.md
index ef2c825..7616985 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-package.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/deployment/deployment-package.md
@@ -30,6 +30,14 @@ description: 二进制包部署
> linux: ./start.sh
```
+* 使用 `PostgreSql` 来存储后台数据, 进入 `/conf` 目录,修改 `application.yaml` 中 `spring.profiles.active` 的配置为 `pg`。
+
+```
+> windows: start.bat
+
+> linux: ./start.sh
+```
+
### 启动 Apache ShenYu Bootstrap
* 下载 `apache-shenyu-incubating-2.4.1-bootstrap-bin.tar.gz`