docker-compose.yaml 2.4 KB

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