auto-letsencrypt icon indicating copy to clipboard operation
auto-letsencrypt copied to clipboard

Standalone option

Open Shardj opened this issue 2 years ago • 0 comments

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.

Shardj avatar Mar 15 '23 15:03 Shardj