代码拉取完成,页面将自动刷新
This project contains a Docker image meant to facilitate the deployment of Nacos.
Run the following command:
Clone project
git clone https://github.com/nacos-group/nacos-docker.git
cd nacos-docker
Standalone Derby
docker-compose -f example/standalone-derby.yaml up
Standalone Mysql
docker-compose -f example/standalone-mysql.yaml up
Cluster
docker-compose -f example/cluster-hostname.yaml up
Service registration
curl -X PUT 'http://127.0.0.1:8848/nacos/v1/ns/instance?serviceName=nacos.naming.serviceName&ip=20.18.7.10&port=8080'
Service discovery
curl -X GET 'http://127.0.0.1:8848/nacos/v1/ns/instances?serviceName=nacos.naming.serviceName'
Publish config
curl -X POST "http://127.0.0.1:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test&content=helloWorld"
Get config
curl -X GET "http://127.0.0.1:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test"
Open the Nacos console in your browser
name | description | option |
---|---|---|
MODE | cluster/standalone | cluster/standalone default cluster |
PREFER_HOST_MODE | Whether hostname are supported | hostname/ip default ip |
NACOS_SERVER_PORT | nacos server port | default 8848 |
SPRING_DATASOURCE_PLATFORM | standalone support mysql | mysql / empty default empty |
MYSQL_MASTER_SERVICE_HOST | mysql master host | |
MYSQL_MASTER_SERVICE_PORT | mysql master database port | default : 3306 |
MYSQL_MASTER_SERVICE_DB_NAME | mysql master database name | |
MYSQL_MASTER_SERVICE_USER | username of master database | |
MYSQL_MASTER_SERVICE_PASSWORD | password of master database | |
MYSQL_SLAVE_SERVICE_HOST | mysql slave host | |
MYSQL_SLAVE_SERVICE_PORT | mysql slave database port | default :3306 |
Usage reference:Nacos monitor-guide
Note: When Grafana creates a new data source, the data source address must be http://prometheus:9090
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。