Reverse proxy configurations for nginx, for development as well as production #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverse proxies on the old server, which we are migrating from, were handled by apache, which was forwarding requests based on domain name and URL to tomcat. In the new docker-based setup, it is convenient to rely on nginx for this, since we are serving node from nginx anyway.
This PR makes angular/nginx/conf.d configurable in docker-compose, so that we can use different configurations for production and development.
Two alternatives are provided: conf.d (the old configuration, for development use) provides a reverse proxy for /json so that angular can talk to scalatra.
In conf.d.prod, additionally we provide a reverse proxy for fusionauth, so that fusionauth and node can live on the same port and server, separated only by the domain name in the request.
The configuration directory is set in docker-compose.yml for the node service as follows: