docker-compose.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. #nginx反向代理
  9. 3dshow2-nginx-dev:
  10. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  11. restart: always
  12. ports:
  13. - 18401:80
  14. volumes:
  15. - ./nginx/conf.d:/etc/nginx/conf.d
  16. - ./nginx/www:/usr/share/nginx/html
  17. depends_on:
  18. # - 3dshow2
  19. - 3dshow2-user-dev
  20. #bus消息中间件
  21. 3dshow2-bus-dev:
  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. - 3dshow2-mongo-dev
  28. - 3dshow2-redis-dev
  29. ports:
  30. - 14401:4222
  31. #redis缓存
  32. 3dshow2-redis-dev:
  33. image: "redis:alpine"
  34. restart: always
  35. command:
  36. --requirepass "3dshow2zzz_x" #这一行是设置密码
  37. privileged: true
  38. ports:
  39. - 16401:6379
  40. #mongo 数据库 3dshow customer-user supply-user
  41. 3dshow2-mongo-dev:
  42. image: mongo:4.4.1
  43. restart: always
  44. environment:
  45. MONGO_INITDB_ROOT_USERNAME: root
  46. MONGO_INITDB_ROOT_PASSWORD: 3dshowzzz_x
  47. volumes:
  48. - ~/data/packs-3dshow2.0-dev/mongo/db:/data/db
  49. - ~/data/packs-3dshow2.0-dev/mongo/log:/var/log/mongodb
  50. # command: mongod --port 27017 --replSet rs0
  51. ports:
  52. - 37401:27017
  53. # 3dshow
  54. 3dshow2-dev:
  55. image: registry.cn-chengdu.aliyuncs.com/infish/pack-3dshow:v2.0.1
  56. restart: always
  57. depends_on:
  58. - 3dshow2-bus-dev
  59. environment:
  60. NATS: nats://3dshow2-bus-dev:4222
  61. MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshowzzz_x@3dshow2-mongo-dev:27017/3dshow?authSource=admin
  62. volumes:
  63. - ./mongo-migrations:/data/migrations
  64. # user服务
  65. 3dshow2-user-dev:
  66. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.1
  67. restart: always
  68. depends_on:
  69. - 3dshow2-bus-dev
  70. environment:
  71. NATS: nats://3dshow2-bus-dev:4222
  72. CONFIGER_MONGO: 3dshow2-user-mongo-dev
  73. CONFIGER_REDIS: 3dshow2-redis-dev
  74. CONFIGER_JWT: spu3d#spu3d secret#168
  75. IGNORE_USERTYPE: "true"
  76. # MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshow@3dshow-mongo-alpha:27017/supply-user?authSource=admin&&/data/migrations==mongodb://user:password@host:port/dbname?query
  77. MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshowzzz_x@3dshow2-mongo-dev:27017/user?authSource=admin
  78. volumes:
  79. - ./mongo-migrations:/data/migrations
  80. rembg-dev:
  81. image: registry.cn-chengdu.aliyuncs.com/infish/rembg:v1.0.0
  82. restart: always
  83. depends_on:
  84. - 3dshow2-bus-dev
  85. environment:
  86. NATSURL: nats://3dshow2-bus-dev:4222