ドッカーで作成したhaproxyとnginxで遊んでいます。 私は何を達成しようとしているが、私はnginxのコンテナをスケールする場合ドッカーの作成スケールがハプロキシで動作しない
ドッカ・コン規模のnginx = 2
するということであるhaproxyコンテナはまた、新しいnginxのコンテナをプロキシ。しかし、何とか新しい容器を認識していない。ここで
は私のconfigsは以下のとおりです。
ドッキングウィンドウ-compose.yml:私はせずに新しいコンテナを認識するhaproxy取得するために何を
version: '2.1'
services:
nginx:
image: 'bitnami/nginx:latest'
healthcheck:
test: "curl -f http://localhost/?healthcheck"
expose:
- "80"
haproxy:
image: haproxy
restart: always
depends_on:
nginx:
condition: service_healthy
links:
- nginx
ports:
- "80:80"
volumes:
- ./haproxy:/usr/local/etc/haproxy/
expose:
- "80"
haproxy.cfg
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
defaults
log global
mode http
option httplog
timeout connect 5000
timeout client 10000
timeout server 10000
frontend localnodes
bind 0.0.0.0:80
mode http
default_backend nodes
backend nodes
mode http
option forwardfor
balance roundrobin
server nginx nginx:80 check
option httpchk GET /?haproxyselfcheck
http-check expect status 200
を行うことができますもう1つのnginxをdocker-composeファイルに手動で追加しますか?