Updated README.md

This commit is contained in:
Mehdi (OSX) 2023-11-23 09:08:55 +05:00
parent 643d6d6bf3
commit a7cb89dd8b

View File

@ -7,16 +7,18 @@ ## Usage:
- Copy contents from [config-example.sh](https://git.w3goodies.com/mehdi-mac/certbot-docker-script/src/branch/main/config-example.sh)
- Modify it to your needs.
5. The folder structure would be:
```
/your-project/ssl/
├── certs (Your certificates will be stored here)
├── config.sh (Your config file)
├── certbot-docker-script (this repository)
```
```
/your-project/ssl/
├── certs (Your certificates will be stored here)
├── config.sh (Your config file)
├── certbot-docker-script (this repository)
```
6. Run:
```shell
your-project/ssl/certbot-docker-script/generate-certs.sh ../config.sh
```
```shell
/your-project/ssl/certbot-docker-script/generate-certs.sh ../config.sh
```
- _Since we `chdir` inside the script, therefore you can keep using `config.sh` with relative path in the command and also `certs_dir` in config.sh_
## Info:
- It uses certbot's docker to generate LetsEncrypt SSL certificates, and it comes with simple script to generate and renew certificate for **single domain.**
@ -35,7 +37,6 @@ ## Notes:
- Make sure to mount both `certs/live/test.com` and `certs/archive/test.com` directory, and use `live/test.com/*.pem` certificates in your nginx config.
- Because archive directory has actual files, but live directory has symlink to archive. In archive, certs are stored like this fullchain1.pem, cert1.pem and number is increased based on renewals. But live folder has direct certificates without number like cert.pem, fullchain.pem
- Also use certbot nginx options file in your nginx config: https://github.com/certbot/certbot/blob/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf
- Since we `chdir` inside the script, therefore you can keep using `config.sh` with relative path in the command and also `certs_dir` in config.sh
---
## Example nginx config: