美文网首页
docker swarm + trafik 微服务

docker swarm + trafik 微服务

作者: pcgreat | 来源:发表于2019-02-13 14:38 被阅读16次

demo 地址


  https://gitee.com/qqb-opensource/trafikdemo/attach_files/download?i=206107&u=http%3A%2F%2Ffiles.git.oschina.net%2Fgroup1%2FM00%2F06%2F80%2FPaAvDFxjuqqABV9lAV03QN6w-tI123.zip%3Ftoken%3Db10964ba3cfb145a8f0de778d76ef0fc%26ts%3D1550039722%26attname%3Dsleuth-webmvc-example-master.zip

maven 编译


mvn clean install dependency:copy-dependencies

cd docker/

创建frontend 镜像 , backend镜像


docker-compose -f docker-compose.yml build

部署trafik服务


docker stack deploy -c tf.yaml traf

部署zipkin 服务 (非必要)


docker stack deploy -c zipline.yaml zipkin

部署frontend , backend 服务


docker stack deploy -c docker-compose-tk-stack.yml app

直接访问 frontend1/ 会调用 http://host.docker.internal:801/backend1/api

支持docker swarm 扩展 docker swarm label 更新 能力

image.png

相关文章

网友评论

      本文标题:docker swarm + trafik 微服务

      本文链接:https://www.haomeiwen.com/subject/wgcdeqtx.html