-
Notifications
You must be signed in to change notification settings - Fork 2
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
Serving static assets #1
Comments
Can’t check it out if it works right now, but the nginx image itself has (a) a mount point for the static content (the “/usr/share/nginx/html” volume) and (b) a mount point for creating additional config files (the “/etc/nginx/sites-enabled” volume). This is pretty much what the docker-gen image does: rewrites a config file at the “sites-enabled” mount. You can go in several ways, but maybe the easiest (to start from) is to mount a host folder at the “html” volume. Have fun! De: Markus Padourek [mailto:[email protected]] Hi there, we are in the stage of moving our infrastructure over to a docker based system (using fig) and this approach with docker-gen and nginx seems like the last missing puzzle piece. Right now we are using a nginx.conf similar to https://gist.github.com/Globegitter/45160dd3b151eeebfde2 and I was wondering, how could you modify the existing template to serve static files via nginx, as configured in the gist? I am just starting to set up a test environment and warpping my head around everything, so might come up with a solution myself sometime over the next couple days but any hints would be appreciated. — |
That would certainly be a possibility, but the idea was to have the node.js app in a separate container and there then exposing for example port 1337, nginx then reverse proxying all the incoming requests to port 80 to that container on port 1337 (I assume that is part of what this repository is trying to solve, right?). Thank you for the response, if you have some more recommendations great, if that is new territory for you as well no worries. |
Hi there, we are in the stage of moving our infrastructure over to a docker based system (using fig) and this approach with docker-gen and nginx seems like the last missing puzzle piece.
Right now we are using a nginx.conf similar to https://gist.github.com/Globegitter/45160dd3b151eeebfde2 and I was wondering, how could you modify the existing template to serve static files via nginx, as configured in the gist?
I am just starting to set up a test environment and warpping my head around everything, so might come up with a solution myself sometime over the next couple days but any hints would be appreciated.
The text was updated successfully, but these errors were encountered: