nacos-docker/example/cluster-ip.yaml

69 lines
1.4 KiB
YAML
Raw Normal View History

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"
- "9555:9555"
env_file:
- ../env/nacos-ip.env
restart: on-failure
depends_on:
- 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"
env_file:
- ../env/nacos-ip.env
restart: always
depends_on:
- 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"
env_file:
- ../env/nacos-ip.env
restart: always
depends_on:
- 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:
- ../env/mysql.env
2019-05-22 08:18:41 +00:00
volumes:
- ./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