docker-compose.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. services:
  8. nrhe-nginx:
  9. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  10. restart: always
  11. ports:
  12. - 8085:80
  13. volumes:
  14. - ./nginx/conf.d:/etc/nginx/conf.d
  15. - ./nginx/www:/usr/share/nginx/html
  16. depends_on:
  17. - nrhe-svc
  18. #bus消息中间件
  19. nrhe-bus:
  20. restart: always
  21. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0
  22. volumes:
  23. - ./config-service.yaml:/root/bus/app.yaml
  24. depends_on:
  25. - nrhe-mongo
  26. # - cr-redis
  27. ports:
  28. - 14222:4222
  29. #redis缓存
  30. # cr-redis:
  31. # image: "redis:alpine"
  32. # restart: always
  33. # command:
  34. # --requirepass "crzzz_x" #这一行是设置密码
  35. # privileged: true
  36. # ports:
  37. # - 16379:6379
  38. nrhe-mongo:
  39. image: mongo:4.4.1
  40. restart: always
  41. environment:
  42. MONGO_INITDB_ROOT_USERNAME: root
  43. MONGO_INITDB_ROOT_PASSWORD: nrhe_zzzxxx
  44. volumes:
  45. - /data/nrhe/mongo/db:/data/db
  46. - /data/nrhe/mongo/log:/var/log/mongodb
  47. ports:
  48. - 17017:27017
  49. nrhe-svc:
  50. image: registry.cn-chengdu.aliyuncs.com/infish/pack-nrhe:v1.0.0
  51. restart: always
  52. depends_on:
  53. - nrhe-bus
  54. volumes:
  55. - ./template:/root/projects/template
  56. - ./mongo-migrations:/root/projects/migrations
  57. environment:
  58. NATS: nats://nrhe-bus:4222
  59. MONGO_MIGRATIONS: /root/projects/migrations==mongodb://root:nrhe_zzzxxx@nrhe-mongo:27017/nrhe?authSource=admin