2019-05-22 08:18:41 +00:00
|
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
nacos1:
|
|
|
|
hostname: nacos1
|
|
|
|
container_name: nacos1
|
2021-03-21 07:13:03 +00:00
|
|
|
image: nacos/nacos-server:${NACOS_VERSION}
|
2019-05-22 08:18:41 +00:00
|
|
|
volumes:
|
|
|
|
- ./cluster-logs/nacos1:/home/nacos/logs
|
|
|
|
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
|
|
|
|
ports:
|
|
|
|
- "8848:8848"
|
2021-04-13 00:31:12 +00:00
|
|
|
- "9848:9848"
|
2019-05-22 08:18:41 +00:00
|
|
|
- "9555:9555"
|
|
|
|
env_file:
|
|
|
|
- ../env/nacos-hostname.env
|
2019-10-25 12:51:45 +00:00
|
|
|
restart: always
|
2019-05-22 08:18:41 +00:00
|
|
|
depends_on:
|
2020-02-16 06:55:11 +00:00
|
|
|
- mysql
|
2019-05-22 08:18:41 +00:00
|
|
|
|
|
|
|
nacos2:
|
|
|
|
hostname: nacos2
|
2021-03-21 07:13:03 +00:00
|
|
|
image: nacos/nacos-server:${NACOS_VERSION}
|
2019-05-22 08:18:41 +00:00
|
|
|
container_name: nacos2
|
|
|
|
volumes:
|
|
|
|
- ./cluster-logs/nacos2:/home/nacos/logs
|
|
|
|
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
|
|
|
|
ports:
|
|
|
|
- "8849:8848"
|
2021-04-13 00:31:12 +00:00
|
|
|
- "9849:9848"
|
2019-05-22 08:18:41 +00:00
|
|
|
env_file:
|
|
|
|
- ../env/nacos-hostname.env
|
2019-10-25 12:51:45 +00:00
|
|
|
restart: always
|
2019-05-22 08:18:41 +00:00
|
|
|
depends_on:
|
2020-02-16 06:55:11 +00:00
|
|
|
- mysql
|
2019-05-22 08:18:41 +00:00
|
|
|
nacos3:
|
|
|
|
hostname: nacos3
|
2021-03-21 07:13:03 +00:00
|
|
|
image: nacos/nacos-server:${NACOS_VERSION}
|
2019-05-22 08:18:41 +00:00
|
|
|
container_name: nacos3
|
|
|
|
volumes:
|
|
|
|
- ./cluster-logs/nacos3:/home/nacos/logs
|
|
|
|
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
|
|
|
|
ports:
|
|
|
|
- "8850:8848"
|
2021-04-13 00:31:12 +00:00
|
|
|
- "9850:9848"
|
2019-05-22 08:18:41 +00:00
|
|
|
env_file:
|
|
|
|
- ../env/nacos-hostname.env
|
2019-10-25 12:51:45 +00:00
|
|
|
restart: always
|
2019-05-22 08:18:41 +00:00
|
|
|
depends_on:
|
2020-02-16 06:55:11 +00:00
|
|
|
- mysql
|
|
|
|
mysql:
|
|
|
|
container_name: mysql
|
2020-02-16 09:01:58 +00:00
|
|
|
image: nacos/nacos-mysql:5.7
|
2019-05-22 08:18:41 +00:00
|
|
|
env_file:
|
2020-02-16 06:55:11 +00:00
|
|
|
- ../env/mysql.env
|
2019-05-22 08:18:41 +00:00
|
|
|
volumes:
|
2020-02-16 06:55:11 +00:00
|
|
|
- ./mysql:/var/lib/mysql
|
2019-05-22 08:18:41 +00:00
|
|
|
ports:
|
|
|
|
- "3306:3306"
|
2019-10-25 12:51:45 +00:00
|
|
|
|