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