Git Product home page Git Product logo

auto-letsencrypt's People

Contributors

gchan avatar mohsenasm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

auto-letsencrypt's Issues

Standalone option

Since I have many webapp containers which all run on different subdomains, I have a proxy container which handles directing traffic in front of my webapps. So it makes more sense to me to simply redirect certbot requests to the certbot container, rather than picking one of my webapps at random to map a webroot with.

So I've modified the entrypoint a tad in my code to allow for the --standalone flag. I don't think it's a particularly tidy solution so I didn't make a pull request. But I figured it was worth raising an issue for as a discussion.

if [[ "$STANDALONE" == 1 ]] ; then
    certbot certonly --standalone --agree-tos --noninteractive --text --expand \
      --email ${EMAIL} \
      ${CERTBOT_DOMAINS}
  else
    certbot certonly --webroot --agree-tos --noninteractive --text --expand \
      --email ${EMAIL} \
      --webroot-path ${WEBROOT_PATH} \
      ${CERTBOT_DOMAINS}
  fi

Thank you for the repo, it's very helpful.

DOMAINS variable takes into account only the first domain

Hi,

When assigning the DOMAINS env variable in the compose file, only the first domain is being processed.

Ex
DOMAINS=tbd.example.com www.tbd.example.com tbd2.example.com www.tbd2.example.com

A certificate will be requested only for the first domain:tbd.example.com

Compose sample:

environment:
- EMAIL=[email protected]
- WEBROOT_PATH=/data/certbot/www
- DOMAINS=tbd.example.com www.tbd.example.com tbd2.example.com www.tbd2.example.com
- CHECK_FREQ=7

Thank you.

CERTS_PATH non functional for multiple domains

Should be something like this instead

for domain in "${DOMAINS[@]}"; do
    cp /etc/letsencrypt/live/$domain/* $CERTS_PATH/
done

Just to get it functional. But even then you end up with the problem of the files from different domains having the same name.

It would probably be better to simply cp -Lr /etc/letsencrypt/live/* $CERTS_PATH/ instead to keep the domain directories separate. Also (-L) to make sure that we don't copy a symlink that'll break when used as a volume between containers.

Edit: actually since certbot will only use the first domain in the list to create the certificate name I suppose cp -L /etc/letsencrypt/live/${DOMAINS[0]}/* $CERTS_PATH/ is what you want

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.