Skip to content

Commit 00145dc

Browse files
Add deploy hook feature (#33)
1 parent b7eca7e commit 00145dc

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ The following environment variables can be used to customize the Certbot contain
6262
| `CERTBOT_EMAIL` | Email address for Let's Encrypt notifications | - |
6363
| `CERTBOT_KEY_TYPE` | Type of private key to generate | `ecdsa` |
6464
| `CERTBOT_SERVER` | The ACME server URL | `https://acme-v02.api.letsencrypt.org/directory` |
65+
| `CERTBOT_DEPLOY_HOOK` | A command to run after obtaining the certificate | - |
6566
| `CLOUDFLARE_API_TOKEN` | Cloudflare API token for DNS authentication (see below how to create one) | - |
6667
| `CLOUDFLARE_CREDENTIALS_FILE` | Path to the Cloudflare credentials file. | `/cloudflare.ini` |
6768
| `CLOUDFLARE_PROPAGATION_SECONDS` | Wait time (in seconds) after setting DNS TXT records before validation. Useful if DNS propagation is slow. | `10` |

src/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ run_certbot() {
114114
set -- "$@" --expand
115115
fi
116116

117+
if [ -n "$CERTBOT_DEPLOY_HOOK" ]; then
118+
set -- "$@" --deploy-hook "$CERTBOT_DEPLOY_HOOK"
119+
fi
120+
117121
# Run certbot command
118122
$certbot_cmd $debug_flag certonly \
119123
--dns-cloudflare \

0 commit comments

Comments
 (0)