first commit

This commit is contained in:
2022-06-18 23:08:39 +00:00
parent 61db9b5ee9
commit afd88220aa
4 changed files with 151 additions and 2 deletions

View File

@ -1,3 +1,35 @@
# certbot-cron-docker
## Cerbot Docker
Docker container that runs certbot on a schedule to create and renew SSL certificates
Docker Certbot that runs on a schedule to create and renew SSL certificates. Uses Cloudflare for DNS-01 verification. Automatic renewal attempt happens every 6 hours.
# Building
```git clone https://git.mrmeeb.stream/certbot-cron-docker
cd certbot-cron-docker
docker build -t certbot-cron .
docker run -d --name certbot-cron \
-e EMAIL=admin@domain.com \
-e DOMAINS=domain.com \
-v /docker/certbot-cron:/config \
certbot-cron
```
# Environment Variables:
| Variable | Default Value | Description |
| --- | --- | --- |
| EMAIL | None | Email address for renewal information & other communications |
| DOMAINS | None | Domains to be included in the certificate. Comma separated list, no spaces. Wildcards supported |
| INTERVAL | 0 */6 * * * | How often certbot attempts to renew the certificate. Cron syntax |
| STAGING | false | Uses the LetsEncrypt staging endpoint for testing - avoids the aggressive rate-limiting of the production endpoint |
# Volumes
| Docker path | Purpose |
| --- | --- |
| /config | Stores configs and LetsEncrypt output for mounting in other containers
Thanks to [this guy](https://stackoverflow.com/questions/63447441/docker-stop-for-crond-times-out) for explaining how to make cron actually shutdown when stopping the container.