docker微服务快速部署

网友投稿 721 2022-11-19

docker微服务快速部署

docker微服务快速部署

docker-compose down关闭所有容器

docker-comose up -d 开启所有容器  -d代表后台启动方式  docker-compose.yml指定默认配置文件

docker-compose.yml文件内容案例:

version: '3'networks: default: external: name: imooc-networkservices: message-service: image: message-service:latest user-service: image: user-service:latest command: - "--mysql.address=172.19.0.2" user-edge-service: image: user-edge-service:latest links: - user-service - message-service command: - "--redis.address=172.19.0.3" course-service: image: course-service:latest links: - user-service command: - "--mysql.address=172.19.0.2" - "--zookeeper.address=172.19.0.4" course-edge-service: image: course-edge-service:latest links: - user-edge-service command: - "--zookeeper.address=172.19.0.4" api-gateway-zuul: image: api-gateway-zuul:latest links: - course-edge-service - user-edge-service ports: - 8080:8080

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:springboot实现以代码的方式配置sharding
下一篇:7届蓝桥杯第6题方格填数
相关文章

 发表评论

暂时没有评论,来抢沙发吧~