-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Separated containers for nginx and docker-gen #34
Comments
Needless to say, that makes "forego" unnecessary too. |
I am still trying to figure things out, but I believe that you can: a) mount the docker binary on the docker-gen container (as you do with the socket) Let's say nginx container is named "web":
|
Nice, got it to work on: https://github.com/andrefernandes/docker-gen https://github.com/andrefernandes/docker-nginx Both nginx and docker-gen containers share a volume. Nginx container knows nothing about docker-gen and gets to reload when SIGHUP signals come. Feels nice :) |
Nice. @vaceletm did something similar using inotify in #5. While I understand the concern about the docker socket bound into the container, I'd rather keep nginx-proxy simple to run and get productive. I've been thinking of having a docker-gen image that would work w/ the offical nginx image (or others) as well but have not had time to experiment with it yet. It would an alternative nginx-proxy setup that I'd add to the documentation. Using fig to start the two seems like a good idea. |
docker-gen 0.3.4 has a new feature that should make running nginx and docker-gen in separate containers easier. There is a new -notify-sighup that will sighup a container. It could be used to sighup an nginx container. 0.3.4 should also work better with shared volumes between containers. |
It kinda creeps me out having a docker.sock mount specially on the nginx node.
It could be a better approach to have nginx and docker-gen on different containers but sharing the "/etc/nginx/sites-enabled" mount (actually the "official" nginx image exposes this volume).
This way only the docker-gen image needs to mount docker.sock.
I prefer, at this moment, using "fig" to define multi-container deployments.
The text was updated successfully, but these errors were encountered: