1
momocraft 2018 年 11 月 25 日 nginx 配置裏寫 500 個 upstream, 實際上有幾個後端就 link 幾個
|
2
kslr 2018 年 11 月 25 日
不想写 nginx 配置?你又没有自动缩放
大不了写个 shell 自动添加,其他办法只会更麻烦 或者付钱买 |
3
gamexg 2018 年 11 月 25 日 |
4
feverzsj 2018 年 11 月 25 日
nginx-proxy 是最简单的,设置 2 个环境变量就可以了
|
5
wangxiaoaer OP @gamexg #3 不错,不错,可能真是我想要的。
|
6
wangxiaoaer OP @gamexg
刚看了下那个项目,中间有一句话: Provided your DNS is setup to forward foo.bar.com to the host running nginx-proxy, the request will be routed to a container with the VIRTUAL_HOST env var set. 也就是说需要本地配置 host 以便把 VIRTUAL_HOST 转发到 nginx-proxy 运行的容器中,但是怎么知道 nginx-proxy 运行的实例的 ip 呢?每次的 ip 可能不一样啊。 |
7
gamexg 2018 年 11 月 26 日 他指的是主机,不是 docker 容器。
nginx-proxy 使用 docker -p 参数接管主机的 80、443 端口,docker 负责管理这个端口映射,不需要 dns 知道容器 ip。 |