You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2022/03/28 08:04:02 UTC

[servicecomb-samples] branch master updated: [#92]Add readme for porter_lightweight web root configuration(#93)

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

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-samples.git


The following commit(s) were added to refs/heads/master by this push:
     new b575f38  [#92]Add readme for porter_lightweight web root configuration(#93)
b575f38 is described below

commit b575f386bf75f6a9e27782ab2404a328821fcd79
Author: hujinming <84...@users.noreply.github.com>
AuthorDate: Mon Mar 28 16:03:57 2022 +0800

    [#92]Add readme for porter_lightweight web root configuration(#93)
---
 porter_lightweight/README.md | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/porter_lightweight/README.md b/porter_lightweight/README.md
index ea4e8f2..f826264 100644
--- a/porter_lightweight/README.md
+++ b/porter_lightweight/README.md
@@ -20,6 +20,7 @@ mvn clean install
 ```
 java $JAVA_OPT -Ddb.url="jdbc:mysql://localhost/porter_user_db?useSSL=false" -Ddb.username=root -Ddb.password=root -jar porter-user-service-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
 ```
+Note: If startup fails, try removing "$JAVA_OPT" and ">/dev/null 2>&1 &" (same below)
 
 * run file-service:
 
@@ -29,7 +30,9 @@ java $JAVA_OPT -jar porter-file-service-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
 
 * run gateway-service:
 
-gateway-service contains static web pages in resources/ui. First copy to web root folder,e.g webapp, which is relative to working directory. 
+gateway-service contains static web pages in resources/ui. First copy to web root folder,e.g webapp, which is relative to working directory
+(Note:"porter_lightweight/gateway-service/src/main/resources/microservice.yaml"The related configuration"gateway:webroot: /code/servicecomb-samples/porter_lightweight/gateway-service/src/main/resources"
+Is the location of its own native code). 
 
 ```
 java $JAVA_OPT -Dgateway.webroot=webapp -jar porter-gateway-service-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
@@ -66,6 +69,7 @@ mvn clean install
 ```
 java $JAVA_OPT -Ddb.url="jdbc:mysql://localhost/porter_user_db?useSSL=false" -Ddb.username=root -Ddb.password=root -jar porter-user-service-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
 ```
+注意:如果启动不了,可以尝试去掉“$JAVA_OPT”和“>/dev/null 2>&1 &”(下同)
 
 * 启动file-service:
 
@@ -75,7 +79,8 @@ java $JAVA_OPT -jar porter-file-service-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
 
 * 启动gateway-serivce:
 
-gateway-service包含了静态页面文件,在resources/ui目录。首先需要将页面文件拷贝到WEB主目录(相对路径,当前运行目录),比如: webapp,然后将ui目录整体拷贝到webapp/ui目录。启动:
+gateway-service包含了静态页面文件,在resources/ui目录。首先需要将页面文件拷贝到WEB主目录(相对路径,当前运行目录),比如: webapp,然后将ui目录整体拷贝到webapp/ui目录(注意:porter_lightweight/gateway-service/src/main/resources/microservice.yaml中的相关配置
+gateway:webroot: /code/servicecomb-samples/porter_lightweight/gateway-service/src/main/resources是自己本地代码的位置)。启动:
 ```
 java $JAVA_OPT -Dgateway.webroot=webapp -jar porter-gateway-service-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
 ```