From ca624f2452fe90909e6e8c818de859e240ad0b07 Mon Sep 17 00:00:00 2001 From: mroldx Date: Sat, 11 Mar 2023 17:34:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?remove:=20=E7=A7=BB=E9=99=A4nacos2.0?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E7=94=A8=E7=9A=84=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E9=9B=86=E7=BE=A4=E7=9A=84=E6=8C=82=E8=BD=BD?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/cluster-ip.yaml | 3 +-- example/custom-application-config.yaml | 2 +- example/standalone-mysql-5.7.yaml | 1 - example/standalone-mysql-8.yaml | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/example/cluster-ip.yaml b/example/cluster-ip.yaml index 2b494ff..0bc2d1d 100644 --- a/example/cluster-ip.yaml +++ b/example/cluster-ip.yaml @@ -11,7 +11,6 @@ services: ports: - "8848:8848" - "9848:9848" - - "9555:9555" env_file: - ../env/nacos-ip.env restart: on-failure @@ -43,7 +42,7 @@ services: nacos_net: ipv4_address: 172.16.238.12 volumes: - - ./cluster-logs/nacos2:/home/nacos/logs + - ./cluster-logs/nacos3:/home/nacos/logs ports: - "8850:8848" - "9850:9848" diff --git a/example/custom-application-config.yaml b/example/custom-application-config.yaml index efd84c0..662ae91 100644 --- a/example/custom-application-config.yaml +++ b/example/custom-application-config.yaml @@ -10,7 +10,7 @@ services: ports: - "8848:8848" - "9848:9848" - - "9555:9555" + - "9849:9849" depends_on: mysql: condition: service_healthy diff --git a/example/standalone-mysql-5.7.yaml b/example/standalone-mysql-5.7.yaml index aa49dbb..d94e9cc 100644 --- a/example/standalone-mysql-5.7.yaml +++ b/example/standalone-mysql-5.7.yaml @@ -11,7 +11,6 @@ services: ports: - "8848:8848" - "9848:9848" - - "9555:9555" depends_on: mysql: condition: service_healthy diff --git a/example/standalone-mysql-8.yaml b/example/standalone-mysql-8.yaml index f2982eb..88de3ae 100644 --- a/example/standalone-mysql-8.yaml +++ b/example/standalone-mysql-8.yaml @@ -10,7 +10,6 @@ services: ports: - "8848:8848" - "9848:9848" - - "9555:9555" depends_on: mysql: condition: service_healthy From 048a2a4f167ed7dec1b1a8e4d40cf36c53cf2b60 Mon Sep 17 00:00:00 2001 From: mroldx Date: Sat, 11 Mar 2023 17:36:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?update:=20=E6=9B=B4=E6=AD=A3=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E6=A8=A1=E5=BC=8F=E4=B8=8B=E9=83=A8=E7=BD=B2nacos?= =?UTF-8?q?=E7=89=88=E6=9C=AC2.0+=E6=83=85=E5=86=B5=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E6=9A=B4=E9=9C=B2=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/nacos-embedded.env | 2 +- env/nacos-hostname.env | 2 +- example/cluster-embedded.yaml | 7 ++++++- example/cluster-hostname.yaml | 7 ++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/env/nacos-embedded.env b/env/nacos-embedded.env index f6e943b..6749990 100644 --- a/env/nacos-embedded.env +++ b/env/nacos-embedded.env @@ -1,7 +1,7 @@ #nacos dev env PREFER_HOST_MODE=hostname EMBEDDED_STORAGE=embedded -NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848 +NACOS_SERVERS=nacos1:8848 nacos2:8849 nacos3:8850 MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_PORT=3306 MYSQL_SERVICE_USER=nacos diff --git a/env/nacos-hostname.env b/env/nacos-hostname.env index 79f2dd1..df9d80a 100644 --- a/env/nacos-hostname.env +++ b/env/nacos-hostname.env @@ -1,6 +1,6 @@ #nacos dev env PREFER_HOST_MODE=hostname -NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848 +NACOS_SERVERS=nacos1:8848 nacos2:8849 nacos3:8850 MYSQL_SERVICE_HOST=mysql MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_PORT=3306 diff --git a/example/cluster-embedded.yaml b/example/cluster-embedded.yaml index 40f5ab0..f2d93fb 100644 --- a/example/cluster-embedded.yaml +++ b/example/cluster-embedded.yaml @@ -7,9 +7,10 @@ services: volumes: - ./cluster-logs/nacos1:/home/nacos/logs ports: + - "7848:7848" - "8848:8848" - "9848:9848" - - "9555:9555" + - "9849:9849" env_file: - ../env/nacos-embedded.env restart: always @@ -21,8 +22,10 @@ services: volumes: - ./cluster-logs/nacos2:/home/nacos/logs ports: + - "7849:7848" - "8849:8848" - "9849:9848" + - "9850:9849" env_file: - ../env/nacos-embedded.env restart: always @@ -33,8 +36,10 @@ services: volumes: - ./cluster-logs/nacos3:/home/nacos/logs ports: + - "7850:7848" - "8850:8848" - "9850:9848" + - "9851:9849" env_file: - ../env/nacos-embedded.env restart: always diff --git a/example/cluster-hostname.yaml b/example/cluster-hostname.yaml index a9cd3bf..d1902bd 100644 --- a/example/cluster-hostname.yaml +++ b/example/cluster-hostname.yaml @@ -7,9 +7,10 @@ services: volumes: - ./cluster-logs/nacos1:/home/nacos/logs ports: + - "7848:7848" - "8848:8848" - "9848:9848" - - "9555:9555" + - "9849:9849" env_file: - ../env/nacos-hostname.env restart: always @@ -24,8 +25,10 @@ services: volumes: - ./cluster-logs/nacos2:/home/nacos/logs ports: + - "7849:7848" - "8849:8848" - "9849:9848" + - "9850:9849" env_file: - ../env/nacos-hostname.env restart: always @@ -39,8 +42,10 @@ services: volumes: - ./cluster-logs/nacos3:/home/nacos/logs ports: + - "7850:7848" - "8850:8848" - "9850:9848" + - "9851:9849" env_file: - ../env/nacos-hostname.env restart: always From 7229c14c34f80775636cd4b4f28a1d39870a6769 Mon Sep 17 00:00:00 2001 From: mroldx Date: Sat, 11 Mar 2023 17:39:54 +0800 Subject: [PATCH 3/4] update: README.md --- README.md | 2 +- README_ZH.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8668fc8..87d0e17 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Run the following command: docker-compose -f example/standalone-mysql-8.yaml up ``` -* Cluster +* Standalone Nacos Cluster ```powershell docker-compose -f example/cluster-hostname.yaml up diff --git a/README_ZH.md b/README_ZH.md index 63c4797..8485c3a 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -49,7 +49,7 @@ docker-compose -f example/standalone-mysql-8.yaml up ``` -* 集群模式 +* docker单节点部署集群模式 ```powershell docker-compose -f example/cluster-hostname.yaml up From 5b9741547a08ad0f59f8325b5fb16c8cf8d93e5a Mon Sep 17 00:00:00 2001 From: mroldx Date: Sat, 11 Mar 2023 18:04:10 +0800 Subject: [PATCH 4/4] fix: add SPRING_DATASOURCE_PLATFORM to nacos-*.env #319 --- env/nacos-embedded.env | 1 + env/nacos-hostname.env | 1 + env/nacos-ip.env | 1 + 3 files changed, 3 insertions(+) diff --git a/env/nacos-embedded.env b/env/nacos-embedded.env index 6749990..2bd3b6f 100644 --- a/env/nacos-embedded.env +++ b/env/nacos-embedded.env @@ -2,6 +2,7 @@ PREFER_HOST_MODE=hostname EMBEDDED_STORAGE=embedded NACOS_SERVERS=nacos1:8848 nacos2:8849 nacos3:8850 +SPRING_DATASOURCE_PLATFORM=mysql MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_PORT=3306 MYSQL_SERVICE_USER=nacos diff --git a/env/nacos-hostname.env b/env/nacos-hostname.env index df9d80a..96f1788 100644 --- a/env/nacos-hostname.env +++ b/env/nacos-hostname.env @@ -1,6 +1,7 @@ #nacos dev env PREFER_HOST_MODE=hostname NACOS_SERVERS=nacos1:8848 nacos2:8849 nacos3:8850 +SPRING_DATASOURCE_PLATFORM=mysql MYSQL_SERVICE_HOST=mysql MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_PORT=3306 diff --git a/env/nacos-ip.env b/env/nacos-ip.env index d6becaf..28c3b41 100644 --- a/env/nacos-ip.env +++ b/env/nacos-ip.env @@ -1,5 +1,6 @@ #nacos dev env NACOS_SERVERS=172.16.238.10:8848 172.16.238.11:8848 172.16.238.12:8848 +SPRING_DATASOURCE_PLATFORM=mysql MYSQL_SERVICE_HOST=mysql MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_PORT=3306