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