diff --git a/README.md b/README.md index 8a9da7b..769ca02 100644 --- a/README.md +++ b/README.md @@ -104,15 +104,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_SSL_ENABLE | use ssl | default : false | -| ~~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 | @@ -128,9 +121,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..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.3.2 +ARG NACOS_VERSION=1.4.0 WORKDIR /$BASE_DIR diff --git a/build/conf/application.properties b/build/conf/application.properties index b27bc3e..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&useSSL=${MYSQL_SSL_ENABLE:false} -db.url.1=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=${MYSQL_SSL_ENABLE:false} +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