docker-compose.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. #nginx反向代理
  9. 3dshow-nginx-alpha:
  10. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  11. restart: always
  12. ports:
  13. - 18095:80
  14. volumes:
  15. - ./nginx/conf.d:/etc/nginx/conf.d
  16. - ./nginx/www:/usr/share/nginx/html
  17. depends_on:
  18. - 3dshow-customer-alpha
  19. - 3dshow-supplier-alpha
  20. - 3dshow-supply-user-alpha
  21. - 3dshow-customer-user-alpha
  22. #bus消息中间件
  23. 3dshow-bus-alpha:
  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-alpha
  30. - 3dshow-redis-alpha
  31. ports:
  32. - 14306:4222
  33. #redis缓存
  34. 3dshow-redis-alpha:
  35. image: "redis:alpine"
  36. restart: always
  37. command:
  38. --requirepass "3dshow" #这一行是设置密码
  39. privileged: true
  40. ports:
  41. - 16395:6379
  42. #mongo 数据库 3dshow customer-user supply-user
  43. 3dshow-mongo-alpha:
  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-alpha/mongo/db:/data/db
  51. - ~/data/packs-3dshow-alpha/mongo/log:/var/log/mongodb
  52. ports:
  53. - 37038:27017
  54. # 3dshow customer
  55. 3dshow-customer-alpha:
  56. image: registry.cn-chengdu.aliyuncs.com/infish/pack-3dshow-customer:v1.0.0
  57. restart: always
  58. depends_on:
  59. - 3dshow-bus-alpha
  60. environment:
  61. NATS: nats://3dshow-bus-alpha:4222
  62. # 3dshow supplier
  63. 3dshow-supplier-alpha:
  64. image: registry.cn-chengdu.aliyuncs.com/infish/pack-3dshow-supplier:v1.0.0
  65. restart: always
  66. depends_on:
  67. - 3dshow-bus-alpha
  68. environment:
  69. NATS: nats://3dshow-bus-alpha:4222
  70. # user服务
  71. 3dshow-supply-user-alpha:
  72. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
  73. restart: always
  74. depends_on:
  75. - 3dshow-bus-alpha
  76. environment:
  77. NATS: nats://3dshow-bus-alpha:4222
  78. CONFIGER_MONGO: 3dshow-supply-user-mongo
  79. CONFIGER_REDIS: 3dshow-redis
  80. CONFIGER_JWT: spu3d#spu3d secret#168
  81. # MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshow@3dshow-mongo-alpha:27017/supply-user?authSource=admin&&/data/migrations==mongodb://user:password@host:port/dbname?query
  82. MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshow@3dshow-mongo-alpha:27017/supply-user?authSource=admin
  83. volumes:
  84. - ./mongo-migrations/supplier:/data/migrations
  85. # c端用户
  86. 3dshow-customer-user-alpha:
  87. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
  88. restart: always
  89. depends_on:
  90. - 3dshow-bus-alpha
  91. environment:
  92. NATS: nats://3dshow-bus-alpha:4222
  93. CONFIGER_MONGO: 3dshow-customer-user-mongo
  94. CONFIGER_REDIS: 3dshow-redis
  95. CONFIGER_JWT: spu3d#spu3d secret#168
  96. MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshow@3dshow-mongo-alpha:27017/customer-user?authSource=admin
  97. volumes:
  98. - ./mongo-migrations/customer:/data/migrations