docker-compose.yaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. #nginx反向代理
  9. box-nginx:
  10. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  11. restart: always
  12. ports:
  13. - 18088:80
  14. volumes:
  15. - ./nginx/conf.d:/etc/nginx/conf.d
  16. - ./nginx/www:/usr/share/nginx/html
  17. # links:
  18. # - box-cost
  19. # - box-usercenter
  20. depends_on:
  21. - box-cost
  22. - box-usercenter
  23. #bus消息中间件
  24. box-bus:
  25. restart: always
  26. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0
  27. volumes:
  28. - ./config-service.yaml:/root/bus/app.yaml
  29. depends_on:
  30. - box-mongo
  31. - box-redis
  32. ports:
  33. - 14300:4222
  34. #redis缓存
  35. box-redis:
  36. image: "redis:alpine"
  37. restart: always
  38. command:
  39. --requirepass "boxcomm" #这一行是设置密码
  40. privileged: true
  41. ports:
  42. - 16390:6379
  43. #mongo 数据库
  44. box-mongo:
  45. image: mongo:4.4.1
  46. restart: always
  47. environment:
  48. MONGO_INITDB_ROOT_USERNAME: root
  49. MONGO_INITDB_ROOT_PASSWORD: boxcost
  50. volumes:
  51. - ~/data/packs-box/mongo/db:/data/db
  52. - ~/data/packs-box/mongo/log:/var/log/mongodb
  53. ports:
  54. - 37030:27017
  55. # cost 8888
  56. box-cost:
  57. image: registry.cn-chengdu.aliyuncs.com/infish/pack-box-cost:v1.0.0
  58. restart: always
  59. depends_on:
  60. - box-bus
  61. environment:
  62. NATS: nats://box-bus:4222
  63. TOPDF_ADDR: http://office-pdf:3000
  64. # 用户中心 8908
  65. box-usercenter:
  66. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.1
  67. restart: always
  68. depends_on:
  69. - box-bus
  70. environment:
  71. NATS: nats://box-bus:4222
  72. CONFIGER_MONGO: box-user-mongo
  73. CONFIGER_REDIS: box-redis
  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:boxcost@box-mongo:27017/box-user?authSource=admin
  78. volumes:
  79. - ./mongo-migrations:/data/migrations
  80. # excel 转pdf
  81. office-pdf:
  82. image: thecodingmachine/gotenberg:6.4.4
  83. restart: always
  84. # ports:
  85. # - 3000:3000