version: '3.8' # 网络 networks: default: name: default-network external: true services: nrhe-nginx: image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1" restart: always ports: - 8085:80 volumes: - ./nginx/conf.d:/etc/nginx/conf.d - ./nginx/www:/usr/share/nginx/html depends_on: - nrhe-svc #bus消息中间件 nrhe-bus: restart: always image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0 volumes: - ./config-service.yaml:/root/bus/app.yaml depends_on: - nrhe-mongo # - cr-redis ports: - 14222:4222 #redis缓存 # cr-redis: # image: "redis:alpine" # restart: always # command: # --requirepass "crzzz_x" #这一行是设置密码 # privileged: true # ports: # - 16379:6379 nrhe-mongo: image: mongo:4.4.1 restart: always environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: nrhe_zzzxxx volumes: - /data/nrhe/mongo/db:/data/db - /data/nrhe/mongo/log:/var/log/mongodb ports: - 17017:27017 nrhe-svc: image: registry.cn-chengdu.aliyuncs.com/infish/pack-nrhe:v1.0.0 restart: always depends_on: - nrhe-bus volumes: - ./template:/root/projects/template - ./mongo-migrations:/root/projects/migrations environment: NATS: nats://nrhe-bus:4222 MONGO_MIGRATIONS: /root/projects/migrations==mongodb://root:nrhe_zzzxxx@nrhe-mongo:27017/nrhe?authSource=admin