Files
hk4e/docker/3rd/nats/nats_cluster/docker-compose.yaml
flswld 0395dc0bc2 1.MongoDB、Redis兼容集群模式
2.离线数据接口化访问
2023-02-26 23:03:13 +08:00

62 lines
1.3 KiB
YAML

version: '3'
services:
nats1:
restart: always
image: nats:2.7.3
container_name: nats1
ports:
- "4222:4222/tcp"
- "8222:8222/tcp"
environment:
TZ: Asia/Shanghai
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- ./conf/nats1/nats-server.conf:/nats-server.conf
- ./data/nats1:/nats/storage
deploy:
resources:
limits:
cpus: '1.00'
memory: 512M
nats2:
restart: always
image: nats:2.7.3
container_name: nats2
ports:
- "4223:4222/tcp"
- "8223:8222/tcp"
environment:
TZ: Asia/Shanghai
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- ./conf/nats2/nats-server.conf:/nats-server.conf
- ./data/nats2:/nats/storage
deploy:
resources:
limits:
cpus: '1.00'
memory: 512M
nats3:
restart: always
image: nats:2.7.3
container_name: nats3
ports:
- "4224:4222/tcp"
- "8224:8222/tcp"
environment:
TZ: Asia/Shanghai
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- ./conf/nats3/nats-server.conf:/nats-server.conf
- ./data/nats3:/nats/storage
deploy:
resources:
limits:
cpus: '1.00'
memory: 512M