m
Size: a a a
m
AF
RB
m
version: "3"
services:
web:
image: nginx:alpine
volumes:
- ./src:/usr/share/nginx/html
ports:
- "80"
networks:
- net1
networks:
net1:
version: "3"front
services:
web:
image: nginx:alpine
volumes:
- ./src:/usr/share/nginx/html
ports:
- "80"
networks:
- net2
networks:
net2:
version: "3"
services:
web:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./conf/default.conf:/etc/nginx/conf.d/default.conf
networks:
- back_net1
- back_net2
networks:
back_net1:
back_net2:
server {
listen 80;
server_name localhost;
location /1 {
proxy_pass http://back_web_1;
}
location /2 {
proxy_pass http://back_web_2;
}
}
m
m
m
m
RB
N
upstream back_web_1 {
server back_web_1;
}
m
m
m
N
RB
back_net2:- не те же сети, что вы описали в двух других компоузах
RB
RB
m
H