docker-compose.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. #nginx反向代理
  9. cmf-nginx:
  10. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  11. restart: always
  12. ports:
  13. - 8087:80
  14. volumes:
  15. - ./nginx/conf.d:/etc/nginx/conf.d
  16. - ./nginx/www:/usr/share/nginx/html
  17. depends_on:
  18. - cmf-srv
  19. # - cmf-tree
  20. #bus消息中间件
  21. cmf-bus:
  22. restart: always
  23. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0
  24. volumes:
  25. - ./config-service.yaml:/root/bus/app.yaml
  26. depends_on:
  27. - cmf-mongo
  28. # - cmf-redis
  29. ports:
  30. - 14226:4222
  31. # cmf-redis:
  32. # image: "redis:alpine"
  33. # restart: always
  34. # command:
  35. # --requirepass "cmf" #这一行是设置密码
  36. # privileged: true
  37. # ports:
  38. # - 16394:6379
  39. cmf-mongo:
  40. image: mongo:4.4.1
  41. restart: always
  42. environment:
  43. MONGO_INITDB_ROOT_USERNAME: root
  44. MONGO_INITDB_ROOT_PASSWORD: cmfxxx
  45. volumes:
  46. - ~/data/packs-cmf/mongo/db:/data/db
  47. - ~/data/packs-cmf/mongo/log:/var/log/mongodb
  48. ports:
  49. - 17019:27017
  50. # user服务
  51. # cmf-user:
  52. # image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.1
  53. # restart: always
  54. # depends_on:
  55. # - cmf-bus
  56. # environment:
  57. # NATS: nats://cmf-bus:4222
  58. # CONFIGER_MONGO: cmf-user-mongo
  59. # CONFIGER_REDIS: cmf-redis
  60. # CONFIGER_JWT: cmf#cmfkeyvvv#168
  61. # user服务
  62. # cmf-tree:
  63. # image: registry.cn-chengdu.aliyuncs.com/infish/pack-queentree-cmf:v1.0.0
  64. # restart: always
  65. # depends_on:
  66. # - cmf-bus
  67. # environment:
  68. # NATS: nats://cmf-bus:4222
  69. # CONFIGER_MONGO: tree-mongo
  70. # CONFIGER_REDIS: cmf-redis
  71. cmf-srv:
  72. image: registry.cn-chengdu.aliyuncs.com/infish/pack-cmf:v1.0.1
  73. restart: always
  74. depends_on:
  75. - cmf-bus
  76. environment:
  77. NATS: nats://cmf-bus:4222
  78. cmf-client:
  79. image: registry.cn-chengdu.aliyuncs.com/infish/cmf-client:v1.0.0
  80. restart: always
  81. depends_on:
  82. - cmf-bus
  83. environment:
  84. NATS: nats://cmf-bus:4222