Added proxy
This commit is contained in:
16
compose/proxy/nginx.conf
Normal file
16
compose/proxy/nginx.conf
Normal file
@@ -0,0 +1,16 @@
|
||||
events {}
|
||||
http{
|
||||
|
||||
upstream backend{
|
||||
server web:80;
|
||||
server web_2:80;
|
||||
server web_3:80;
|
||||
}
|
||||
|
||||
server{
|
||||
listen 80;
|
||||
location / {
|
||||
proxy_pass http://backend;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
compose/proxy/proxy.yml
Normal file
14
compose/proxy/proxy.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
web:
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./web:/usr/share/nginx/html:ro
|
||||
|
||||
proxy:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- web
|
||||
Reference in New Issue
Block a user