Coder Social home page Coder Social logo

Comments (13)

JrCs avatar JrCs commented on May 22, 2024

My container call the nginx proxy container to recreate the nginx configuration with docker-gen.
Why don't you use the original nginx-proxy container with docker-gen in it ?
If you need to change the template that is used to create the nginx configuration you can mount bind the nginx.tpl with your configuration.

from acme-companion.

konstantinj avatar konstantinj commented on May 22, 2024

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.

from acme-companion.

bobmaerten avatar bobmaerten commented on May 22, 2024

Exactly my setup, @konstantinj. I'll try installing/using the @JrCs image to get it running, and I'll report back here then.

from acme-companion.

JrCs avatar JrCs commented on May 22, 2024

To use my container we need to know the container id of the docker-gen container.
@konstantinj is your docker-gen container do an nginx reload ? if yes how ?

from acme-companion.

konstantinj avatar konstantinj commented on May 22, 2024

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".

from acme-companion.

bobmaerten avatar bobmaerten commented on May 22, 2024

Well, no luck with containerized docker-gen, so I switch back on default nginx-proxy for now.

from acme-companion.

JrCs avatar JrCs commented on May 22, 2024

@konstantinj no the docker-gen command of the nginx-proxy call directly the nginx reload command (they are in the same container)

from acme-companion.

konstantinj avatar konstantinj commented on May 22, 2024

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.

from acme-companion.

JrCs avatar JrCs commented on May 22, 2024

How the docker-gen image reload the nginx in the other container ?

from acme-companion.

bobmaerten avatar bobmaerten commented on May 22, 2024

@JrCs docker-gen tool has a -notify-sighup <container_name> flag to do some sort of kill -HUP to the container.

from acme-companion.

mpatton125 avatar mpatton125 commented on May 22, 2024

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.

from acme-companion.

JrCs avatar JrCs commented on May 22, 2024

A PR #20 is open to fix this issue.

from acme-companion.

konstantinj avatar konstantinj commented on May 22, 2024

Awesome!

from acme-companion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.