-
Notifications
You must be signed in to change notification settings - Fork 814
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
Usage with separate nginx and docker-gen container #12
Comments
My container call the nginx proxy container to recreate the nginx configuration with docker-gen. |
The default nginx-proxy container is using the /app/nginx.tmpl file which I can't overwrite with a mount. Also by using nginx separately I can use a newer version and the docker socket won't be exposed publicly. |
Exactly my setup, @konstantinj. I'll try installing/using the @JrCs image to get it running, and I'll report back here then. |
To use my container we need to know the container id of the docker-gen container. |
In the readme from https://github.com/jwilder/nginx-proxy it says that the nginx container must be named "nginx". So I guess that's how docker-gen can reload nginx. So it should work the same with your container I guess when the container name is hard "docker-gen". |
Well, no luck with containerized |
@konstantinj no the docker-gen command of the nginx-proxy call directly the nginx reload command (they are in the same container) |
Yes, when using nginx-proxy image. But in my case, when using docker-gen image and nginx image separately, docker-gen is reloading nginx in the other container. |
How the docker-gen image reload the nginx in the other container ? |
@JrCs |
I have this working (for the most part) with minimal code changes, with official nginx image and docker-gen 0.5.0. Everything is working as expected getting certs etc. The only bump I currently have is that docker-gen command run in the docker-gen container doesn't seem to exit properly (or in fact, at all). So while the LE companion container does it's work correctly and fires off the docker-gen command followed by the nginx container HUP, the docker-gen command never exits so the LE container sits there doing nothing, waiting for it. :( I have raised an issue with docker-gen and will see what is said. |
A PR #20 is open to fix this issue. |
Awesome! |
Hi,
thanks for this awesome image - exactly what I was looking for. Unfortunately it's not working with my configuration. I'm using docker-compose and I have a separate nginx container and docker-gen in its own container so I can modify the nginx config template.
I'm getting this error on start:
How is this image supposed to work?
The text was updated successfully, but these errors were encountered: