Article Directory
Use Docker compose the cluster to build nacos
1, pull docker nacos warehouse
Access nacos git repository
to download the project, or directly pull over
git clone https://github.com/nacos-group/nacos-docker.git
Directory structure is as follows, build is to build some of the required documents
env variables set
example is the orchestration script
2, directly build a test cluster nacos
Proceed to the next example directory
There are so many files
cluster-hostname.yaml
Hostname to run the cluster
cluster-ip.yaml
to run a cluster ip
standalone-derby.yaml
be a stand-alone start by derby embedded database
standalone-mysql-5.7.yaml
for standalone started by mysql 5.7
standalone-mysql-8.yaml
for standalone start by mysql 8
Select a way you want to run, and then modify the file name docker-compose.yaml
ordocker-compose.yml
Then the example folder instead nacos, because the name is the name of the folder layout
Nacos into the directory, then run, hostname here to form the cluster as an example
docker-compose -f docker-compose.yaml up -d
3, docker-compose not run problem-solving
Given as follows
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
This is because you must be in the directory and file name that you need to run must be docker-compose.yml or docker-compose.yaml
otherwise inoperable, can only start
4, to see if a successful start
He assigned the default port is 884,888,498,850, a random access can see the cluster to build success