This commit is contained in:
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ env.GITHUB_ACCESS_TOKEN }}
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.2.1
|
||||
uses: softprops/action-gh-release@v2.6.1
|
||||
with:
|
||||
generate_release_notes: true
|
||||
make_latest: "true"
|
||||
|
||||
@@ -1 +1 @@
|
||||
FROM ccr.ccs.tencentyun.com/miaogai/goacme:v4.22.2
|
||||
FROM goacme/lego:v4.33.0
|
||||
|
||||
@@ -9,7 +9,7 @@ dokku-letsencrypt is the official plugin for [dokku][dokku] that gives the abili
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
sudo dokku plugin:install http://47.94.22.80:3000/gitea/dokku-letsencrypt.git
|
||||
sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
|
||||
sudo dokku letsencrypt:cron-job --add # <- To enable auto-renew
|
||||
```
|
||||
|
||||
|
||||
@@ -38,19 +38,23 @@ cmd-letsencrypt-auto-renew() {
|
||||
# For all apps, sorted by ascending time left until renewal.
|
||||
# This way, we'll prioritize apps that need to be renewed soon
|
||||
# if we should hit a rate limit along the way.
|
||||
fn-letsencrypt-list-apps-with-expiry \
|
||||
| sort -nk5 \
|
||||
| while IFS=$'\t' read -r -a appExpiry; do
|
||||
|
||||
if [[ ${appExpiry[4]} -lt 0 ]]; then
|
||||
dokku_log_info1 "${appExpiry[0]} needs renewal"
|
||||
dokku letsencrypt:enable "${appExpiry[0]}" || EXIT_CODE=$?
|
||||
else
|
||||
days_left=$(fn-letsencrypt-format-timediff "${appExpiry[4]}")
|
||||
dokku_log_verbose "${appExpiry[0]} still has $days_left days left before renewal"
|
||||
# Store the list in a temporary file to avoid subshell issues with pipelines
|
||||
local temp_file=$(mktemp)
|
||||
fn-letsencrypt-list-apps-with-expiry | sort -nk5 > "$temp_file"
|
||||
|
||||
while IFS=$'\t' read -r -a appExpiry; do
|
||||
if [[ ${appExpiry[4]} -lt 0 ]]; then
|
||||
dokku_log_info1 "${appExpiry[0]} needs renewal"
|
||||
if ! dokku letsencrypt:enable "${appExpiry[0]}"; then
|
||||
EXIT_CODE=1
|
||||
fi
|
||||
|
||||
done
|
||||
else
|
||||
days_left=$(fn-letsencrypt-format-timediff "${appExpiry[4]}")
|
||||
dokku_log_verbose "${appExpiry[0]} still has $days_left days left before renewal"
|
||||
fi
|
||||
done < "$temp_file"
|
||||
|
||||
rm -f "$temp_file"
|
||||
|
||||
dokku_log_info2 "Finished auto-renewal"
|
||||
if [[ "$EXIT_CODE" != 0 ]]; then
|
||||
|
||||
@@ -231,7 +231,7 @@ fn-letsencrypt-check-email() {
|
||||
fn-letsencrypt-configure-and-get-dir() {
|
||||
declare desc="assemble lego command line arguments and create a config hash directory for them"
|
||||
declare APP="$1"
|
||||
local config config_dir config_hash dns_provider domain_args domains email extra_args graceperiod key server value
|
||||
local config config_dir config_hash dns_provider domain_args domains email extra_args cert_timeout key server value
|
||||
|
||||
local app_root="$DOKKU_ROOT/$APP"
|
||||
local le_root="$app_root/letsencrypt"
|
||||
@@ -251,10 +251,11 @@ fn-letsencrypt-configure-and-get-dir() {
|
||||
domain_args="$domain_args --domains $domain"
|
||||
done
|
||||
|
||||
graceperiod="$(fn-letsencrypt-computed-graceperiod "$APP")"
|
||||
# lego --cert.timeout is in seconds and defaults to 30
|
||||
cert_timeout=30
|
||||
email="$(fn-letsencrypt-computed-email "$APP")"
|
||||
extra_args="$(fn-letsencrypt-computed-lego-docker-args "$APP")"
|
||||
config="--pem --accept-tos --cert.timeout $graceperiod --path /certs --server $server --email $email $extra_args $domain_args"
|
||||
config="--pem --accept-tos --cert.timeout $cert_timeout --path /certs --server $server --email $email $extra_args $domain_args"
|
||||
|
||||
dns_provider="$(fn-letsencrypt-computed-dns-provider "$APP")"
|
||||
if [[ -n "$dns_provider" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user