Update 'README.md'

This commit is contained in:
MrMeeb 2022-06-21 16:56:35 +00:00
parent d2999b8307
commit 6056a0bcd7

View File

@ -2,20 +2,30 @@
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 & Running
## Running
### Docker CLI
```
git clone https://git.mrmeeb.stream/certbot-cron-docker
cd certbot-cron-docker
docker build -t certbot-cron .
docker run -d --name certbot-cron \
docker run -d --name certbot \
-e EMAIL=admin@domain.com \
-e DOMAINS=domain.com \
-v /docker/certbot-cron:/config \
certbot-cron
git.mrmeeb.stream/mrmeeb/certbot:latest
```
### Docker Compose
```
version: "3"
services:
certbot:
image: git.mrmeeb.stream/mrmeeb/certbot:latest
container_name: certbot
restart: unless-stopped
volumes:
- ./certbot:/config
environment:
- EMAIL=admin@domain.com
- DOMAINS=domain.com,*.domain.com
```
## Environment Variables:
@ -36,6 +46,22 @@ docker run -d --name certbot-cron \
| --- | --- |
| /config | Stores configs and LetsEncrypt output for mounting in other containers
## 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
```
## Other
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.