Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse proxy configurations for nginx, for development as well as production #25

Open
wants to merge 1 commit into
base: kosugi/angular-docker
Choose a base branch
from

Conversation

jtnystrom
Copy link
Contributor

@jtnystrom jtnystrom commented Aug 10, 2023

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:

     volumes:
       - ./angular/nginx/conf.d:/etc/nginx/conf.d

Make angular/nginx/conf.d configurable in docker-compose, so that we can track different configurations for production and for development use.
In conf.d/default (for development use), provide a reverse proxy for /json so that angular can talk to scalatra.
In conf.d.prod/default, additionally 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant