2019-05-22 08:18:41 +00:00
|
|
|
version: "2"
|
|
|
|
services:
|
|
|
|
nacos1:
|
2021-03-21 07:13:03 +00:00
|
|
|
image: nacos/nacos-server:${NACOS_VERSION}
|
2019-05-22 08:18:41 +00:00
|
|
|
container_name: nacos1
|
|
|
|
networks:
|
|
|
|
nacos_net:
|
|
|
|
ipv4_address: 172.16.238.10
|
|
|
|
volumes:
|
|
|
|
- ./cluster-logs/nacos1:/home/nacos/logs
|
|
|
|
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-ip.env
|
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
2020-02-16 06:55:11 +00:00
|
|
|
- mysql
|
2019-05-22 08:18:41 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
networks:
|
|
|
|
nacos_net:
|
|
|
|
ipv4_address: 172.16.238.11
|
|
|
|
volumes:
|
|
|
|
- ./cluster-logs/nacos2:/home/nacos/logs
|
|
|
|
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-ip.env
|
|
|
|
restart: always
|
|
|
|
depends_on:
|
2020-02-16 06:55:11 +00:00
|
|
|
- mysql
|
2019-05-22 08:18:41 +00:00
|
|
|
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
|
|
|
|
networks:
|
|
|
|
nacos_net:
|
|
|
|
ipv4_address: 172.16.238.12
|
|
|
|
volumes:
|
|
|
|
- ./cluster-logs/nacos2:/home/nacos/logs
|
|
|
|
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-ip.env
|
|
|
|
restart: always
|
|
|
|
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
|
|
|
networks:
|
|
|
|
nacos_net:
|
|
|
|
ipv4_address: 172.16.238.13
|
|
|
|
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"
|
|
|
|
networks:
|
|
|
|
nacos_net:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
|
|
|
- subnet: 172.16.238.0/24
|