n1b0r / docker-flow-proxy-letsencrypt

39 stars 16 forks source link

control staging vs. production with a label #12

Closed lgazo closed 6 years ago

lgazo commented 7 years ago

It would be great to control whether certificate is generated against staging or production Let's Encrypt by specifying a label in the service.

n1b0r commented 7 years ago

Hey,

There is the CERTBOT_OPTIONS env var set to --staging that can be used to globally set the staging mode.

Do you need to set the staging/prod letsencrypt mode per swarm service ? What is your use case ?

lgazo commented 7 years ago

Yes that was my idea to set it per swarm service. My initial thought was to have a set of "experimental" services that do not require final certificate. I do not want to have two docker flow proxies and I did not see a possibility to have to docker flow let's encrypt instances with routing for production and staging version. I do not know if it makes sense now, but staging certificates are usually enough for quick experiments and development versions.

n1b0r commented 7 years ago

Yes it makes sense for your use case. Would you like to submit a merge request ? Several piece of code have to change to handle this request. I will try to do something soon but I am busy at the moment.

vnkmpf commented 7 years ago

Hi, I need exactly the same feature. I took a look on it, and tried to implement this functionality. I can push in few days - in best case tomorrow. Need to do some more testing before, though :)

n1b0r commented 7 years ago

Do not hesitate to contact me if you have any question.

vnkmpf commented 7 years ago

So I added a pull request, hope everything is fine, it's my first ever contribution on Github :)

vnkmpf commented 6 years ago

@lgazo changes should be now merged in 0.7 release :)

@n1b0r can this issue be closed now?

n1b0r commented 6 years ago

thanks @vnkmpf for the contribution !

vnkmpf commented 6 years ago

Sure, no problem. Glad I could help :)