From 8f1ee0e68c3e862a4debc74dbddf97b00f292fd3 Mon Sep 17 00:00:00 2001 From: Dan Mirsky Date: Mon, 25 Jul 2016 16:07:48 -0700 Subject: [PATCH] Updated docker docs to renew with certbot In order to resolve the name through docker's dns, we have to specify the usual container name (certbot) - docker-compose only does automatically this if you use `start certbot`, not with `run`. Also added --rm to remove the container after it's done so we don't have multiple with the same name --- docs/deployment-with-docker.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index c84daa1de..03aefd486 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -89,7 +89,7 @@ If you would like to set up autorenewal of your certificates, the following comm #!/bin/bash cd - docker-compose run certbot bash -c "sleep 6 && certbot certonly --standalone -d {{ cookiecutter.domain_name }} --text --agree-tos --email {{ cookiecutter.email }} --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --verbose --keep-until-expiring --standalone-supported-challenges http-01" + docker-compose run --rm --name certbot certbot bash -c "sleep 6 && certbot certonly --standalone -d {{ cookiecutter.domain_name }} --text --agree-tos --email {{ cookiecutter.email }} --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --verbose --keep-until-expiring --standalone-supported-challenges http-01" docker exec pearl_nginx_1 nginx -s reload And then set a cronjob by running `crontab -e` and placing in it (period can be adjusted as desired)::