Added example nginx proxy working
This commit is contained in:
@@ -2,9 +2,9 @@ events {}
|
||||
http{
|
||||
|
||||
upstream backend{
|
||||
server web:80;
|
||||
server web_2:80;
|
||||
server web_3:80;
|
||||
server proxy-web-1:80;
|
||||
server proxy-web-2:80;
|
||||
server proxy-web-3:80;
|
||||
}
|
||||
|
||||
server{
|
||||
@@ -13,4 +13,4 @@ http{
|
||||
proxy_pass http://backend;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
services:
|
||||
web:
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./web:/usr/share/nginx/html:ro
|
||||
|
||||
|
||||
proxy:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
@@ -11,4 +9,4 @@ services:
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- web
|
||||
- web
|
||||
|
||||
Reference in New Issue
Block a user