nginx-proxy docker 的nginx自动服务发现方案


registrator containerpilot 都是很不错的基于容器的服务发现以及服务状态管理方案,nginx-proxy 也是一个类似的东西,可以方便的处理服务的nginx proxy 配置
我们基于环境变量配置就可以了

参考使用

 
version: '2'
services:
  nginx-proxy:
    image: jwilder/nginx-proxy
    ports:
      - "80:80"
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
  whoami:
    image: jwilder/whoami
    environment:
      - VIRTUAL_HOST=whoami.local

说明

以上介绍的几个东西都是不错的单机服务解决方案

参考资料

https://github.com/nginx-proxy/nginx-proxy
https://github.com/gliderlabs/registrator
https://github.com/joyent/containerpilot
https://www.joyent.com/blog/applications-on-autopilot


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM