version: '3.8' # 网络 networks: default: external: name: default-network services: #nginx反向代理 tree-nginx: image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1" restart: always ports: - 18082:80 volumes: - ./nginx/conf.d:/etc/nginx/conf.d - ./nginx/www:/usr/share/nginx/html depends_on: - tree-main - tree-task - tree-count #bus消息中间件 tree-bus: restart: always image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.1 volumes: - ./config-service.yaml:/root/bus/app.yaml depends_on: - tree-mongo - tree-redis ports: - 14220:4222 - 14225:4333 #redis缓存 tree-redis: image: "redis:alpine" restart: always command: --requirepass "packtree" #这一行是设置密码 privileged: true #mongo -alpha数据库 tree-mongo: image: mongo:4.4.1 restart: always environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: tree volumes: - ~/data/packs-queentree/mongo/db:/data/db - ~/data/packs-queentree/mongo/log:/var/log/mongodb ports: - 37019:27017 #tree tree-main: image: registry.cn-chengdu.aliyuncs.com/infish/pack-queentree-tree:v1.0.1 restart: always environment: NATS: nats://tree-bus:4222 depends_on: - tree-bus tree-task: image: registry.cn-chengdu.aliyuncs.com/infish/pack-tree-taskcenter:v1.0.1 restart: always environment: NATS: nats://tree-bus:4222 depends_on: - tree-bus tree-count: image: registry.cn-chengdu.aliyuncs.com/infish/pack-queentree-count:v1.0.0 restart: always environment: NATS: nats://tree-bus:4222 depends_on: - tree-bus