docker-compose.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. name: default-network
  6. external: true
  7. # 服务
  8. services:
  9. #nginx反向代理
  10. sku3d-nginx:
  11. image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
  12. restart: always
  13. ports:
  14. - 18081:80
  15. volumes:
  16. - ./nginx/conf.d:/etc/nginx/conf.d
  17. - ./nginx/www:/usr/share/nginx/html
  18. depends_on:
  19. - sku3d-usercenter
  20. # nats消息中间件
  21. sku3d-bus:
  22. restart: always
  23. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.1
  24. volumes:
  25. - ./config-service.yaml:/root/bus/app.yaml
  26. depends_on:
  27. - sku3d-mongo
  28. - sku3d-redis
  29. ports:
  30. - 14223:4222
  31. # redis缓存
  32. sku3d-redis:
  33. image: "redis:alpine"
  34. restart: always
  35. command:
  36. --requirepass "packsku3d" #这一行是设置密码
  37. privileged: true
  38. ports:
  39. - 16379:6379
  40. # mongo数据库
  41. sku3d-mongo:
  42. image: mongo:4.4.1
  43. restart: always
  44. environment:
  45. MONGO_INITDB_ROOT_USERNAME: root
  46. MONGO_INITDB_ROOT_PASSWORD: root
  47. volumes:
  48. - ~/data/packs-sku3d/mongo/db:/data/db
  49. - ~/data/packs-sku3d/mongo/log:/var/log/mongodb
  50. ports:
  51. - 37018:27017
  52. #user服务
  53. sku3d-usercenter:
  54. image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
  55. restart: always
  56. depends_on:
  57. - sku3d-bus
  58. environment:
  59. NATS: nats://sku3d-bus:4222