Merge remote-tracking branch 'origin/master'

This commit is contained in:
pader 2023-03-17 18:49:31 +08:00
commit 559d81307e
11 changed files with 21 additions and 11 deletions

View File

@ -60,7 +60,7 @@ Run the following command
docker-compose -f example/standalone-mysql-8.yaml up docker-compose -f example/standalone-mysql-8.yaml up
``` ```
* Cluster * Standalone Nacos Cluster
```powershell ```powershell
docker-compose -f example/cluster-hostname.yaml up docker-compose -f example/cluster-hostname.yaml up

View File

@ -49,7 +49,7 @@
docker-compose -f example/standalone-mysql-8.yaml up docker-compose -f example/standalone-mysql-8.yaml up
``` ```
* 集群模式 * docker单节点部署集群模式
```powershell ```powershell
docker-compose -f example/cluster-hostname.yaml up docker-compose -f example/cluster-hostname.yaml up

View File

@ -1,7 +1,8 @@
#nacos dev env #nacos dev env
PREFER_HOST_MODE=hostname PREFER_HOST_MODE=hostname
EMBEDDED_STORAGE=embedded EMBEDDED_STORAGE=embedded
NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848 NACOS_SERVERS=nacos1:8848 nacos2:8849 nacos3:8850
SPRING_DATASOURCE_PLATFORM=mysql
MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_DB_NAME=nacos_devtest
MYSQL_SERVICE_PORT=3306 MYSQL_SERVICE_PORT=3306
MYSQL_SERVICE_USER=nacos MYSQL_SERVICE_USER=nacos

View File

@ -1,6 +1,7 @@
#nacos dev env #nacos dev env
PREFER_HOST_MODE=hostname PREFER_HOST_MODE=hostname
NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848 NACOS_SERVERS=nacos1:8848 nacos2:8849 nacos3:8850
SPRING_DATASOURCE_PLATFORM=mysql
MYSQL_SERVICE_HOST=mysql MYSQL_SERVICE_HOST=mysql
MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_DB_NAME=nacos_devtest
MYSQL_SERVICE_PORT=3306 MYSQL_SERVICE_PORT=3306

1
env/nacos-ip.env vendored
View File

@ -1,5 +1,6 @@
#nacos dev env #nacos dev env
NACOS_SERVERS=172.16.238.10:8848 172.16.238.11:8848 172.16.238.12:8848 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_HOST=mysql
MYSQL_SERVICE_DB_NAME=nacos_devtest MYSQL_SERVICE_DB_NAME=nacos_devtest
MYSQL_SERVICE_PORT=3306 MYSQL_SERVICE_PORT=3306

View File

@ -7,9 +7,10 @@ services:
volumes: volumes:
- ./cluster-logs/nacos1:/home/nacos/logs - ./cluster-logs/nacos1:/home/nacos/logs
ports: ports:
- "7848:7848"
- "8848:8848" - "8848:8848"
- "9848:9848" - "9848:9848"
- "9555:9555" - "9849:9849"
env_file: env_file:
- ../env/nacos-embedded.env - ../env/nacos-embedded.env
restart: always restart: always
@ -21,8 +22,10 @@ services:
volumes: volumes:
- ./cluster-logs/nacos2:/home/nacos/logs - ./cluster-logs/nacos2:/home/nacos/logs
ports: ports:
- "7849:7848"
- "8849:8848" - "8849:8848"
- "9849:9848" - "9849:9848"
- "9850:9849"
env_file: env_file:
- ../env/nacos-embedded.env - ../env/nacos-embedded.env
restart: always restart: always
@ -33,8 +36,10 @@ services:
volumes: volumes:
- ./cluster-logs/nacos3:/home/nacos/logs - ./cluster-logs/nacos3:/home/nacos/logs
ports: ports:
- "7850:7848"
- "8850:8848" - "8850:8848"
- "9850:9848" - "9850:9848"
- "9851:9849"
env_file: env_file:
- ../env/nacos-embedded.env - ../env/nacos-embedded.env
restart: always restart: always

View File

@ -7,9 +7,10 @@ services:
volumes: volumes:
- ./cluster-logs/nacos1:/home/nacos/logs - ./cluster-logs/nacos1:/home/nacos/logs
ports: ports:
- "7848:7848"
- "8848:8848" - "8848:8848"
- "9848:9848" - "9848:9848"
- "9555:9555" - "9849:9849"
env_file: env_file:
- ../env/nacos-hostname.env - ../env/nacos-hostname.env
restart: always restart: always
@ -24,8 +25,10 @@ services:
volumes: volumes:
- ./cluster-logs/nacos2:/home/nacos/logs - ./cluster-logs/nacos2:/home/nacos/logs
ports: ports:
- "7849:7848"
- "8849:8848" - "8849:8848"
- "9849:9848" - "9849:9848"
- "9850:9849"
env_file: env_file:
- ../env/nacos-hostname.env - ../env/nacos-hostname.env
restart: always restart: always
@ -39,8 +42,10 @@ services:
volumes: volumes:
- ./cluster-logs/nacos3:/home/nacos/logs - ./cluster-logs/nacos3:/home/nacos/logs
ports: ports:
- "7850:7848"
- "8850:8848" - "8850:8848"
- "9850:9848" - "9850:9848"
- "9851:9849"
env_file: env_file:
- ../env/nacos-hostname.env - ../env/nacos-hostname.env
restart: always restart: always

View File

@ -11,7 +11,6 @@ services:
ports: ports:
- "8848:8848" - "8848:8848"
- "9848:9848" - "9848:9848"
- "9555:9555"
env_file: env_file:
- ../env/nacos-ip.env - ../env/nacos-ip.env
restart: on-failure restart: on-failure
@ -43,7 +42,7 @@ services:
nacos_net: nacos_net:
ipv4_address: 172.16.238.12 ipv4_address: 172.16.238.12
volumes: volumes:
- ./cluster-logs/nacos2:/home/nacos/logs - ./cluster-logs/nacos3:/home/nacos/logs
ports: ports:
- "8850:8848" - "8850:8848"
- "9850:9848" - "9850:9848"

View File

@ -10,7 +10,7 @@ services:
ports: ports:
- "8848:8848" - "8848:8848"
- "9848:9848" - "9848:9848"
- "9555:9555" - "9849:9849"
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy

View File

@ -11,7 +11,6 @@ services:
ports: ports:
- "8848:8848" - "8848:8848"
- "9848:9848" - "9848:9848"
- "9555:9555"
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy

View File

@ -10,7 +10,6 @@ services:
ports: ports:
- "8848:8848" - "8848:8848"
- "9848:9848" - "9848:9848"
- "9555:9555"
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy