This is an automated email from the ASF dual-hosted git repository. sijie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar-manager.git
The following commit(s) were added to refs/heads/master by this push: new c3fd41f Update readme for start backend service (#211) c3fd41f is described below commit c3fd41fa06a1decfcfc56196e86aafa412bc93f9 Author: tuteng <guangn...@apache.org> AuthorDate: Tue Nov 19 10:35:31 2019 +0800 Update readme for start backend service (#211) * Update readme for start backend service --- README.md | 14 ++++++++------ docker/Dockerfile | 4 +++- docker/supervisord.conf | 2 +- src/README.md | 4 ++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c028a65..b8033f0 100644 --- a/README.md +++ b/README.md @@ -90,17 +90,17 @@ The pulsar-manager can monitor topics and subscriptions. * `REDIRECT_PORT`: the port of the front-end server. - * `DRIVER_CLASS_NAME`: the driver class name of MySQL. + * `DRIVER_CLASS_NAME`: the driver class name of PostgreSQL. - * `URL`: the url of MySQL jdbc, example: jdbc:mysql://localhost:3306/pulsar_manager?useSSL=false + * `URL`: the url of PostgreSQL jdbc, example: jdbc:postgresql://127.0.0.1:5432/pulsar_manager - * `USERNAME`: the username of MySQL + * `USERNAME`: the username of PostgreSQL - * `PASSWORD`: the password of MySQL + * `PASSWORD`: the password of PostgreSQL ``` docker pull apache/pulsar-manager - docker run -it -p 9527:9527 -e REDIRECT_HOST=front-end-ip -e REDIRECT_PORT=front-end-port -e DRIVER_CLASS_NAME=com.mysql.jdbc.Driver -e URL='jdbc-url' -e USERNAME=root -e PASSWORD=pulsar pulsar-manager /bin/sh + docker run -it -p 9527:9527 -e REDIRECT_HOST=front-end-ip -e REDIRECT_PORT=front-end-port -e DRIVER_CLASS_NAME=org.postgresql.Driver -e URL='jdbc-url' -e USERNAME=root -e PASSWORD=pulsar pulsar-manager /bin/sh ``` This is an example: @@ -121,7 +121,9 @@ The pulsar-manager can monitor topics and subscriptions. ``` cd pulsar-manager ./gradlew build -x test - java -jar ./build/libs/pulsar-manager.jar + cd build/distributions + unzip pulsar-manager.zip or tar -zxvf pulsar-manager.tar + ./pulsar-manager/bin/pulsar-manager ``` (3) Build and start the front end. diff --git a/docker/Dockerfile b/docker/Dockerfile index 223dd62..d5138f6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,7 +43,9 @@ RUN mkdir -p /run/nginx WORKDIR /pulsar-manager -COPY build/libs/*.jar pulsar-manager.jar +COPY build/distributions/pulsar-manager.tar . + +RUN tar -zxvf pulsar-manager.tar COPY docker/supervisord.conf /etc/ diff --git a/docker/supervisord.conf b/docker/supervisord.conf index bd93427..0c990f2 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -28,5 +28,5 @@ minfds=1024 minprocs=200 [program:pulsar-manager-backend] -command = /usr/bin/java -jar /pulsar-manager/pulsar-manager.jar --redirect.host=%(ENV_REDIRECT_HOST)s --redirect.port=%(ENV_REDIRECT_PORT)s --spring.datasource.driver-class-name=%(ENV_DRIVER_CLASS_NAME)s --spring.datasource.url=%(ENV_URL)s --spring.datasource.username=%(ENV_USERNAME)s --spring.datasource.password=%(ENV_PASSWORD)s --spring.datasource.initialization-mode=never +command = /pulsar-manager/pulsar-manager/bin/pulsar-manager --redirect.host=%(ENV_REDIRECT_HOST)s --redirect.port=%(ENV_REDIRECT_PORT)s --spring.datasource.driver-class-name=%(ENV_DRIVER_CLASS_NAME)s --spring.datasource.url=%(ENV_URL)s --spring.datasource.username=%(ENV_USERNAME)s --spring.datasource.password=%(ENV_PASSWORD)s --spring.datasource.initialization-mode=never user = root diff --git a/src/README.md b/src/README.md index 542a62e..34bb30a 100644 --- a/src/README.md +++ b/src/README.md @@ -21,7 +21,7 @@ Pulsar manager backend is a supplement and improvement to Pulsar broker. ### How to set parameters when starting back-end services ``` -java -jar ./build/libs/pulsar-manager.jar --redirect.host=http://localhost --redirect.port=9527 insert.stats.interval=600000 +./build/distributions/pulsar-manager/bin/pulsar-manager --redirect.host=http://localhost --redirect.port=9527 insert.stats.interval=600000 ``` ### Use custom databases @@ -60,7 +60,7 @@ For more information, see [Apache Pulsar](http://pulsar.apache.org/docs/en/secur * Method 1: Use command-line tool ``` -java -jar ./build/libs/pulsar-manager.jar --redirect.host=http://localhost --redirect.port=9527 insert.stats.interval=600000 --backend.jwt.token=token --jwt.broker.token.mode=PRIVATE --jwt.broker.private.key=file:///path/broker-private.key --jwt.broker.public.key=file:///path/broker-public.key +./build/distributions/pulsar-manager/bin/pulsar-manager --redirect.host=http://localhost --redirect.port=9527 insert.stats.interval=600000 --backend.jwt.token=token --jwt.broker.token.mode=PRIVATE --jwt.broker.private.key=file:///path/broker-private.key --jwt.broker.public.key=file:///path/broker-public.key ``` * Method 2. Configure the application.properties file