12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- version: '3.8'
- # 网络
- networks:
- default:
- name: default-network
- external: true
- services:
- #nginx反向代理
- oilseal-train-nginx:
- image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
- restart: always
- ports:
- - 18090:80
- volumes:
- - ./nginx/conf.d:/etc/nginx/conf.d
- - ./nginx/www:/usr/share/nginx/html
- depends_on:
- - oilseal-train
- - oilseal-train-user
-
- #bus消息中间件
- oilseal-train-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:
- - oilseal-train-mongo
- - oilseal-train-redis
- ports:
- - 14302:4222
- #redis缓存
- oilseal-train-redis:
- image: "redis:alpine"
- restart: always
- command:
- --requirepass "oilseal-train" #这一行是设置密码
- privileged: true
- ports:
- - 16392:6379
- #mongo 数据库
- oilseal-train-mongo:
- image: mongo:4.4.1
- restart: always
- environment:
- MONGO_INITDB_ROOT_USERNAME: root
- MONGO_INITDB_ROOT_PASSWORD: oilseal-train
- volumes:
- - ~/data/packs-oilseal-train/mongo/db:/data/db
- - ~/data/packs-oilseal-train/mongo/log:/var/log/mongodb
- ports:
- - 37032:27017
- # oilseal-train
- oilseal-train:
- image: registry.cn-chengdu.aliyuncs.com/infish/pack-oilseal-train:v1.0.0
- restart: always
- depends_on:
- - oilseal-train-bus
- environment:
- NATS: nats://oilseal-train-bus:4222
- # user服务
- oilseal-train-user:
- image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
- restart: always
- depends_on:
- - oilseal-train-bus
- environment:
- NATS: nats://oilseal-train-bus:4222
- CONFIGER_MONGO: oilseal-train-user-mongo
- CONFIGER_REDIS: oilseal-train-redis
-
|