docker-compose.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. moutai-nginx:
  9. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  10. restart: always
  11. ports:
  12. - 8086:80
  13. volumes:
  14. - ./nginx/conf.d:/etc/nginx/conf.d
  15. - ./nginx/www:/usr/share/nginx/html
  16. depends_on:
  17. - moutai-svc
  18. #bus消息中间件
  19. moutai-bus:
  20. restart: always
  21. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0
  22. volumes:
  23. - ./config-service.yaml:/root/bus/app.yaml
  24. depends_on:
  25. - moutai-mongo
  26. ports:
  27. - 14223:4222
  28. moutai-mongo:
  29. image: mongo:4.4.1
  30. restart: always
  31. environment:
  32. MONGO_INITDB_ROOT_USERNAME: root
  33. MONGO_INITDB_ROOT_PASSWORD: moutai_zzzxxx
  34. volumes:
  35. - /data/moutai/mongo/db:/data/db
  36. - /data/moutai/mongo/log:/var/log/mongodb
  37. ports:
  38. - 17018:27017
  39. moutai-svc:
  40. image: registry.cn-chengdu.aliyuncs.com/infish/pack-moutai:v1.0.0
  41. restart: always
  42. depends_on:
  43. - moutai-bus
  44. volumes:
  45. - ./mongo-migrations:/root/projects/migrations
  46. environment:
  47. NATS: nats://moutai-bus:4222
  48. MONGO_MIGRATIONS: /root/projects/migrations==mongodb://root:moutai_zzzxxx@moutai-mongo:27017/moutai?authSource=admin