Created
January 20, 2016 15:24
-
-
Save spalladino/b0aa03d3119780398136 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