docker-compose.yaml 2.2 KB

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