docker-compose.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. #nginx反向代理
  9. cr-nginx:
  10. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  11. restart: always
  12. ports:
  13. - 8085:80
  14. volumes:
  15. - ./nginx/conf.d:/etc/nginx/conf.d
  16. # - ./nginx/www:/usr/share/nginx/html
  17. - ./nginx/www:/root/www/html
  18. depends_on:
  19. - cr-svc
  20. - cr-user
  21. #bus消息中间件
  22. cr-bus:
  23. restart: always
  24. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0
  25. volumes:
  26. - ./config-service.yaml:/root/bus/app.yaml
  27. depends_on:
  28. - cr-mongo
  29. - cr-redis
  30. ports:
  31. - 14222:4222
  32. #redis缓存
  33. cr-redis:
  34. image: "redis:alpine"
  35. restart: always
  36. command:
  37. --requirepass "crzzz_x" #这一行是设置密码
  38. privileged: true
  39. ports:
  40. - 16379:6379
  41. cr-mongo:
  42. image: mongo:4.4.1
  43. restart: always
  44. environment:
  45. MONGO_INITDB_ROOT_USERNAME: root
  46. MONGO_INITDB_ROOT_PASSWORD: crzzz_x
  47. volumes:
  48. - ~/cr-svc/data/mongo/db:/data/db
  49. - ~/cr-svc/data/mongo/log:/var/log/mongodb
  50. ports:
  51. - 17017:27017
  52. cr-svc:
  53. image: registry.cn-chengdu.aliyuncs.com/infish/pack-cr:v1.0.0
  54. restart: always
  55. depends_on:
  56. - cr-bus
  57. environment:
  58. NATS: nats://cr-bus:4222
  59. UPLOAD_PKG_URL: http://192.168.110.238:8085/cr/pkg
  60. volumes:
  61. - ~/cr-svc/data/package:/root/projects/package
  62. cr-user:
  63. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.1
  64. restart: always
  65. depends_on:
  66. - cr-bus
  67. environment:
  68. NATS: nats://cr-bus:4222
  69. CONFIGER_MONGO: cr-user-mongo
  70. CONFIGER_REDIS: cr-redis
  71. CONFIGER_JWT: crsvc#crsvc_zzzzxxx#168
  72. IGNORE_USERTYPE: "true"
  73. # MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshow@3dshow-mongo-alpha:27017/supply-user?authSource=admin&&/data/migrations==mongodb://user:password@host:port/dbname?query
  74. MONGO_MIGRATIONS: /data/migrations==mongodb://root:crzzz_x@cr-mongo:27017/user?authSource=admin
  75. volumes:
  76. - ./mongo-migrations:/data/migrations