- .99 - .100:8001 - default-proxy
- .99/shop - .101:8002 - shop-proxy
- CPU 와 RAM 사양을 늘리고, Network 를 Bridge Type 인 VMnet0 으로 변경하자
manager 의 역활을 수행한다
FROM nginx
ADD index.html /usr/share/nginx/html/index.html
version: '3.7'
services:
sports_nginx:
image: 192.168.1.116:5000/sports:hong
deploy:
mode: global
placement:
constraints: [node.labels.domain != sports]
restart_policy:
condition: on-failure
max_attempts: 2
environment:
SERVICE_PORTS: 80
networks:
- sports
sports_proxy:
image: dockercloud/haproxy
depends_on:
- sports_nginx
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8004:80"
networks:
- sports
deploy:
mode: global
placement:
constraints: [node.labels.domain == sports]
networks:
sports:
external: true
FROM nginx
ADD index2.html /usr/share/nginx/html/index.html
docker container run -d --restart always -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --name portainer portainer/portainer
- 허나, 이번 Project 의 목표는 Network Node Balancer 의 역활을 하는 HAproxy 를 이용하여 .99 대역의 주소를 이용하여 각 페이지에 접속할 수 있어야한다