123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- version: '3.8'
- # 网络
- networks:
- default:
- name: default-network
- external: true
- services:
- # nginx反向代理
- nginx:
- image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
- restart: always
- ports:
- - 18980:80
- volumes:
- - ./nginx/conf.d:/etc/nginx/conf.d
- - ./nginx/www:/usr/share/nginx/html
- depends_on:
- - pay
- # bus消息中间件
- pay-bus:
- restart: always
- image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0
- volumes:
- - ./config-service.yaml:/root/bus/app.yaml
- depends_on:
- - pay-mongo
- - pay-redis
- ports:
- - 14921:4222
- # redis缓存
- pay-redis:
- image: "redis:alpine"
- restart: always
- command:
- --requirepass "packcomm" #这一行是设置密码
- privileged: true
- # 数据库
- pay-mongo:
- image: mongo:4.4.1
- restart: always
- environment:
- MONGO_INITDB_ROOT_USERNAME: root
- MONGO_INITDB_ROOT_PASSWORD: infishpayvvv
- volumes:
- - ~/data/packs-pay/mongo/db:/data/db
- - ~/data/packs-pay/mongo/log:/var/log/mongodb
- ports:
- - 37917:27017
- # 支付服务
- pay:
- image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-pay:v1.0.0
- restart: always
- depends_on:
- - pay-bus
- environment:
- NATS: nats://pay-bus:4222
|