docker-compose.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. #nginx反向代理
  9. oilseal-train-nginx:
  10. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  11. restart: always
  12. ports:
  13. - 18090:80
  14. volumes:
  15. - ./nginx/conf.d:/etc/nginx/conf.d
  16. - ./nginx/www:/usr/share/nginx/html
  17. depends_on:
  18. - oilseal-train
  19. - oilseal-train-user
  20. #bus消息中间件
  21. oilseal-train-bus:
  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. - oilseal-train-mongo
  28. - oilseal-train-redis
  29. ports:
  30. - 14302:4222
  31. #redis缓存
  32. oilseal-train-redis:
  33. image: "redis:alpine"
  34. restart: always
  35. command:
  36. --requirepass "oilseal-train" #这一行是设置密码
  37. privileged: true
  38. ports:
  39. - 16392:6379
  40. #mongo 数据库
  41. oilseal-train-mongo:
  42. image: mongo:4.4.1
  43. restart: always
  44. environment:
  45. MONGO_INITDB_ROOT_USERNAME: root
  46. MONGO_INITDB_ROOT_PASSWORD: oilseal-train
  47. volumes:
  48. - ~/data/packs-oilseal-train/mongo/db:/data/db
  49. - ~/data/packs-oilseal-train/mongo/log:/var/log/mongodb
  50. ports:
  51. - 37032:27017
  52. # oilseal-train
  53. oilseal-train:
  54. image: registry.cn-chengdu.aliyuncs.com/infish/pack-oilseal-train:v1.0.0
  55. restart: always
  56. depends_on:
  57. - oilseal-train-bus
  58. environment:
  59. NATS: nats://oilseal-train-bus:4222
  60. # user服务
  61. oilseal-train-user:
  62. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
  63. restart: always
  64. depends_on:
  65. - oilseal-train-bus
  66. environment:
  67. NATS: nats://oilseal-train-bus:4222
  68. CONFIGER_MONGO: oilseal-train-user-mongo
  69. CONFIGER_REDIS: oilseal-train-redis