compose-dev-tls icon indicating copy to clipboard operation
compose-dev-tls copied to clipboard

WIP: utilizing letsencrypt

Open zaherg opened this issue 5 years ago • 4 comments

This PR will utilize letsencrypt to create a valid SSL certificate that you can use.

Requirements:

  1. Domain name
  2. Make sure your domain is controlled by one of the supported DNS providers https://docs.traefik.io/https/acme/#providers
  3. Change the Domain DNS to 127.0.0.1
  4. Make sure to edit docker-compose.yml file to match your

for example, if you are using DigitalOcean there is no need to change anything, just make sure to create a new file .env which contain the following information:

DO_AUTH_TOKEN=the-token-you-get-from-digitalocean
MAIN_DOMAIN=yourdomain.com
SANS_DOMAIN=*.yourdomain.com

I am sure this PR needs a lot of enhancing but this is just a starting point.

#Ref: a longer example can be found here https://gist.github.com/zaherg/26cb8f41073708d4b94239f0aaf3bb79

zaherg avatar Aug 28 '20 20:08 zaherg

Thanks, @zaherg. This would be a nice 2nd example of how to use this repository if you have your own domain name to use, but that changes the use case of this repository because I'm assuming everyone doesn't. How would you suggest we accommodate both scenarios?

BretFisher avatar Sep 15 '20 19:09 BretFisher

@BretFisher how about having two folders, one with your code since it will use a self-signed SSL certificate and the second one for letsencrypt

zaherg avatar Sep 16 '20 07:09 zaherg

@BretFisher how about we just add a link to my repo instead of editing your repo https://github.com/zaherg/letsencrypt-for-local-development ?

zaherg avatar Oct 04 '20 13:10 zaherg

Sounds good. I haven't spent enough time to come up with a easy alternative that allows both approaches. I do like keeping your PR there as a way for users to see the difference in approaches so I'll keep that open.

BretFisher avatar Oct 06 '20 09:10 BretFisher