A instance of NGINX used in the ws-dev-docker-example serving as proxy for 2 other containers
This repository is part of a larger effort to expound on the strategies and approaches delineated in the article Practical Web Development and Architecture. NGINX is used as proxy, to navigate request between two docker containers:
- Back-End ws-node-demo
- Front-End ws-ngx-login-demo
The ngin.conf applies the request URI to one of the above containers base an parameter in the URI:
-
location/
- proxy_pass http://ws-ngx-login-demo:5555
-
location/api
- proxy_pass http:ws-node-demo:8080/api
-
location/docs
- proxy_pass http:ws-node-demo:8080/docs
The proxy_pass are based on the named services (containers implementations) in ws-dev-docker-example/docker-compose.yml