由于上传了几次docker-compose.yaml格式编译都不通过,这里放一下正确模板,以备后面使用
version: '3' # 版本为123,已docker engine为例,一般为3 docker1.10之前为1
services:
gateway:
container_name: service-gateway
image: api-gateway
ports:
- 8222:8222
networks:
- net_doctor
depends_on:
- nacos
cms:
container_name: service-cms
image: service-cms
ports:
- 8004:8004
networks:
- net_doctor
depends_on:
- nacos
- mysql
- redis
edu:
container_name: service-edu
image: service-edu