docker-compose.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. external:
  6. name: default-network
  7. services:
  8. #nginx反向代理
  9. tree-nginx:
  10. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  11. restart: always
  12. ports:
  13. - 18082:80
  14. volumes:
  15. - ./nginx/conf.d:/etc/nginx/conf.d
  16. - ./nginx/www:/usr/share/nginx/html
  17. depends_on:
  18. - tree-main
  19. - tree-task
  20. - tree-count
  21. #bus消息中间件
  22. tree-bus:
  23. restart: always
  24. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.1
  25. volumes:
  26. - ./config-service.yaml:/root/bus/app.yaml
  27. depends_on:
  28. - tree-mongo
  29. - tree-redis
  30. ports:
  31. - 14220:4222
  32. - 14225:4333
  33. #redis缓存
  34. tree-redis:
  35. image: "redis:alpine"
  36. restart: always
  37. command:
  38. --requirepass "packtree" #这一行是设置密码
  39. privileged: true
  40. #mongo -alpha数据库
  41. tree-mongo:
  42. image: mongo:4.4.1
  43. restart: always
  44. environment:
  45. MONGO_INITDB_ROOT_USERNAME: root
  46. MONGO_INITDB_ROOT_PASSWORD: tree
  47. volumes:
  48. - ~/data/packs-queentree/mongo/db:/data/db
  49. - ~/data/packs-queentree/mongo/log:/var/log/mongodb
  50. ports:
  51. - 37019:27017
  52. #tree
  53. tree-main:
  54. image: registry.cn-chengdu.aliyuncs.com/infish/pack-queentree-tree:v1.0.1
  55. restart: always
  56. environment:
  57. NATS: nats://tree-bus:4222
  58. depends_on:
  59. - tree-bus
  60. tree-task:
  61. image: registry.cn-chengdu.aliyuncs.com/infish/pack-tree-taskcenter:v1.0.1
  62. restart: always
  63. environment:
  64. NATS: nats://tree-bus:4222
  65. depends_on:
  66. - tree-bus
  67. tree-count:
  68. image: registry.cn-chengdu.aliyuncs.com/infish/pack-queentree-count:v1.0.0
  69. restart: always
  70. environment:
  71. NATS: nats://tree-bus:4222
  72. depends_on:
  73. - tree-bus