-
-
Save valentin2105/650c9e4ca3e4ab0e9c35a993a5036498 to your computer and use it in GitHub Desktop.
Template for renewing a letsencrypt certificate in a docker nginx proxy via letsencrypt's docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p {{ proxy_dir }}/www/{{ domain }} | |
docker pull quay.io/letsencrypt/letsencrypt | |
docker run -it --rm --name letsencrypt \ | |
-v "/etc/letsencrypt:/etc/letsencrypt" \ | |
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ | |
--volumes-from {{ proxy_docker_container }} \ | |
quay.io/letsencrypt/letsencrypt \ | |
certonly \ | |
--webroot \ | |
--webroot-path /var/www/{{ domain }} \ | |
--agree-tos \ | |
--renew-by-default \ | |
-d {{ domain }} \ | |
-m {{ email }} | |
docker kill --signal=HUP {{ proxy_docker_container }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment