From 2b53d18f19b73654afb19cce68adc82fc0e2a76c Mon Sep 17 00:00:00 2001 From: pader Date: Fri, 23 Oct 2020 17:53:27 +0800 Subject: [PATCH 1/2] Release 1.4.0-BETA for Nacos --- README.md | 13 ++++--------- build/Dockerfile | 2 +- build/conf/application.properties | 4 ++-- example/cluster-embedded.yaml | 6 +++--- example/standalone-mysql-8.yaml | 2 +- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 03d2eaa..17eb6a4 100644 --- a/README.md +++ b/README.md @@ -100,14 +100,8 @@ Run the following command: | MYSQL_SERVICE_DB_NAME | mysql database name | | | MYSQL_SERVICE_USER | username of database | | | MYSQL_SERVICE_PASSWORD | password of database | | -| ~~MYSQL_MASTER_SERVICE_HOST~~ | The **latest** version of the image removes this attribute, using MYSQL_SERVICE_HOST | | -| ~~MYSQL_MASTER_SERVICE_PORT~~ | The **latest** version of the image removes this attribute, using MYSQL_SERVICE_PORT | default : **3306** | -| ~~MYSQL_MASTER_SERVICE_DB_NAME~~ | The **latest** version of the image removes this attribute, using MYSQL_SERVICE_DB_NAME | | -| ~~MYSQL_MASTER_SERVICE_USER~~ | The **latest** version of the image removes this attribute, using MYSQL_SERVICE_USER | | -| ~~MYSQL_MASTER_SERVICE_PASSWORD~~ | The **latest** version of the image removes this attribute, using MYSQL_SERVICE_PASSWORD | | -| ~~MYSQL_SLAVE_SERVICE_HOST~~ | The **latest** version of the image removes this attribute | | -| ~~MYSQL_SLAVE_SERVICE_PORT~~ | The **latest** version of the image removes this attribute | default :3306 | | MYSQL_DATABASE_NUM | It indicates the number of database | default :**1** | +| MYSQL_SERVICE_DB_PARAM | Database url parameter | default : **characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true** | | JVM_XMS | -Xms | default :2g | | JVM_XMX | -Xmx | default :2g | | JVM_XMN | -Xmn | default :1g | @@ -123,9 +117,10 @@ Run the following command: | MEMBER_LIST | Set the cluster list with a configuration file or command-line argument | eg:192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809 | | EMBEDDED_STORAGE | Use embedded storage in cluster mode without mysql | `embedded` default : none | +## Advanced configuration +If the above property configuration list does not meet your requirements, you can mount the `custom.properties` file into the `/home/nacos/init.d/` directory of the container, where the spring properties can be configured, and the priority is higher than `application.properties` file - - +Reference example: [cluster-hostname.yaml](/example/cluster-hostname.yaml) ## Nacos + Grafana + Prometheus Usage reference:[Nacos monitor-guide](https://nacos.io/zh-cn/docs/monitor-guide.html) diff --git a/build/Dockerfile b/build/Dockerfile index 8fd0c21..3a1d40a 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -20,7 +20,7 @@ ENV MODE="cluster" \ TOMCAT_ACCESSLOG_ENABLED="false" \ TIME_ZONE="Asia/Shanghai" -ARG NACOS_VERSION=1.3.2 +ARG NACOS_VERSION=1.4.0-BETA WORKDIR /$BASE_DIR diff --git a/build/conf/application.properties b/build/conf/application.properties index 6953e69..4c052d8 100644 --- a/build/conf/application.properties +++ b/build/conf/application.properties @@ -8,8 +8,8 @@ nacos.cmdb.eventTaskInterval=10 nacos.cmdb.labelTaskInterval=300 nacos.cmdb.loadDataAtStart=false db.num=${MYSQL_DATABASE_NUM:1} -db.url.0=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true -db.url.1=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true +db.url.0=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?${MYSQL_SERVICE_DB_PARAM:characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true} +db.url.1=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?${MYSQL_SERVICE_DB_PARAM:characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true} db.user=${MYSQL_SERVICE_USER} db.password=${MYSQL_SERVICE_PASSWORD} ### The auth system to use, currently only 'nacos' is supported: diff --git a/example/cluster-embedded.yaml b/example/cluster-embedded.yaml index 2b3d393..38d4517 100644 --- a/example/cluster-embedded.yaml +++ b/example/cluster-embedded.yaml @@ -3,7 +3,7 @@ services: nacos1: hostname: nacos1 container_name: nacos1 - image: nacos/nacos-server:1.3.0 + image: nacos/nacos-server:1.3.2 volumes: - ./cluster-logs/nacos1:/home/nacos/logs - ./init.d/custom.properties:/home/nacos/init.d/custom.properties @@ -16,7 +16,7 @@ services: nacos2: hostname: nacos2 - image: nacos/nacos-server:1.3.0 + image: nacos/nacos-server:1.3.2 container_name: nacos2 volumes: - ./cluster-logs/nacos2:/home/nacos/logs @@ -28,7 +28,7 @@ services: restart: always nacos3: hostname: nacos3 - image: nacos/nacos-server:1.3.0 + image: nacos/nacos-server:1.3.2 container_name: nacos3 volumes: - ./cluster-logs/nacos3:/home/nacos/logs diff --git a/example/standalone-mysql-8.yaml b/example/standalone-mysql-8.yaml index dc00af0..d0eb426 100644 --- a/example/standalone-mysql-8.yaml +++ b/example/standalone-mysql-8.yaml @@ -1,7 +1,7 @@ version: "2" services: nacos: - image: nacos/nacos-server:1.3.1 + image: nacos/nacos-server:1.4.0-BETA container_name: nacos-standalone-mysql env_file: - ../env/nacos-standlone-mysql.env From 9349f49951ccd4aa4acb473be9cdacb3f5ba2050 Mon Sep 17 00:00:00 2001 From: pader Date: Tue, 3 Nov 2020 16:55:57 +0800 Subject: [PATCH 2/2] Release 1.4.0-BETA for Nacos --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 3a1d40a..a69082c 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -20,7 +20,7 @@ ENV MODE="cluster" \ TOMCAT_ACCESSLOG_ENABLED="false" \ TIME_ZONE="Asia/Shanghai" -ARG NACOS_VERSION=1.4.0-BETA +ARG NACOS_VERSION=1.4.0 WORKDIR /$BASE_DIR