nacos-docker/example/cluster-hostname.yaml

57 lines
1.3 KiB
YAML
Raw Normal View History

2019-05-22 08:18:41 +00:00
version: "3"
services:
nacos1:
hostname: nacos1
container_name: nacos1
image: nacos/nacos-server:latest
volumes:
- ./cluster-logs/nacos1:/home/nacos/logs
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
ports:
- "8848:8848"
- "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:
- mysql
2019-05-22 08:18:41 +00:00
nacos2:
hostname: nacos2
image: nacos/nacos-server:latest
container_name: nacos2
volumes:
- ./cluster-logs/nacos2:/home/nacos/logs
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
ports:
- "8849:8848"
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:
- mysql
2019-05-22 08:18:41 +00:00
nacos3:
hostname: nacos3
image: nacos/nacos-server:latest
container_name: nacos3
volumes:
- ./cluster-logs/nacos3:/home/nacos/logs
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
ports:
- "8850:8848"
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:
- 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:
- ../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"
2019-10-25 12:51:45 +00:00