chore: update letsencrypt plugin to 0.25.2
Vendored copy refreshed from dokku/dokku-letsencrypt master (0.20.4 -> 0.25.2), keeping the same set of files the fork vendors (no tests, Makefile, or CI workflow).
This commit is contained in:
1 parent
ef2f6012e1
commit
424232c5af
13 files changed
+1011
-233
No files matched your search
@@ -25,11 +25,18 @@ fn-letsencrypt-migrate-properties() {
|
||||
|
||||
value=$(plugn trigger config-get-global "DOKKU_LETSENCRYPT_ARGS" || true)
|
||||
if [[ -n "$value" ]]; then
|
||||
dokku_log_info1 "Migrating deprecated global DOKKU_LETSENCRYPT_ARGS to letsencrypt lego-docker-args property."
|
||||
fn-plugin-property-write "letsencrypt" "--global" "lego-docker-args" "$value"
|
||||
dokku_log_info1 "Migrating deprecated global DOKKU_LETSENCRYPT_ARGS to letsencrypt lego-args property."
|
||||
fn-plugin-property-write "letsencrypt" "--global" "lego-args" "$value"
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --global DOKKU_LETSENCRYPT_ARGS || true
|
||||
fi
|
||||
|
||||
value="$(fn-plugin-property-get-default "letsencrypt" "--global" "lego-docker-args" "")"
|
||||
if [[ -n "$value" ]]; then
|
||||
dokku_log_info1 "Migrating deprecated global lego-docker-args property to lego-args."
|
||||
fn-plugin-property-write "letsencrypt" "--global" "lego-args" "$value"
|
||||
fn-plugin-property-delete "letsencrypt" "--global" "lego-docker-args"
|
||||
fi
|
||||
|
||||
value=$(plugn trigger config-get-global "DOKKU_LETSENCRYPT_SERVER" || true)
|
||||
if [[ -n "$value" ]]; then
|
||||
dokku_log_info1 "Migrating deprecated global DOKKU_LETSENCRYPT_SERVER to letsencrypt server property."
|
||||
@@ -54,11 +61,18 @@ fn-letsencrypt-migrate-properties() {
|
||||
|
||||
value="$(plugn trigger config-get "$app" DOKKU_LETSENCRYPT_ARGS || true)"
|
||||
if [[ -n "$value" ]]; then
|
||||
dokku_log_info1 "Migrating deprecated DOKKU_LETSENCRYPT_ARGS to letsencrypt lego-docker-args property for $app."
|
||||
fn-plugin-property-write "letsencrypt" "$app" "lego-docker-args" "$value"
|
||||
dokku_log_info1 "Migrating deprecated DOKKU_LETSENCRYPT_ARGS to letsencrypt lego-args property for $app."
|
||||
fn-plugin-property-write "letsencrypt" "$app" "lego-args" "$value"
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$app" "DOKKU_LETSENCRYPT_ARGS" || true
|
||||
fi
|
||||
|
||||
value="$(fn-plugin-property-get-default "letsencrypt" "$app" "lego-docker-args" "")"
|
||||
if [[ -n "$value" ]]; then
|
||||
dokku_log_info1 "Migrating deprecated lego-docker-args property to lego-args for $app."
|
||||
fn-plugin-property-write "letsencrypt" "$app" "lego-args" "$value"
|
||||
fn-plugin-property-delete "letsencrypt" "$app" "lego-docker-args"
|
||||
fi
|
||||
|
||||
value="$(plugn trigger config-get "$app" DOKKU_LETSENCRYPT_SERVER || true)"
|
||||
if [[ -n "$value" ]]; then
|
||||
dokku_log_info1 "Migrating deprecated DOKKU_LETSENCRYPT_SERVER to letsencrypt server property for $app."
|
||||
@@ -84,6 +98,24 @@ plugin-install() {
|
||||
pull-docker-image "${PLUGIN_IMAGE}:${PLUGIN_IMAGE_VERSION}"
|
||||
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/letsencrypt"
|
||||
chmod 0755 "${DOKKU_LIB_ROOT}/data/letsencrypt"
|
||||
# Migrate the legacy autorenew marker into the --global container introduced
|
||||
# to keep plugin-owned entries from colliding with same-named apps. Drop the
|
||||
# legacy copy unconditionally once the new one exists.
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/letsencrypt/--global"
|
||||
if [[ -f "${DOKKU_LIB_ROOT}/data/letsencrypt/autorenew" && ! -e "${DOKKU_LIB_ROOT}/data/letsencrypt/--global/autorenew" ]]; then
|
||||
touch "${DOKKU_LIB_ROOT}/data/letsencrypt/--global/autorenew"
|
||||
fi
|
||||
rm -f "${DOKKU_LIB_ROOT}/data/letsencrypt/autorenew"
|
||||
# Heal per-app ACME webroots whose mode was previously left at the invoker's
|
||||
# umask (commonly 0700 under sudo). nginx must be able to read these to
|
||||
# serve HTTP-01 challenges; the files are public by design. Skip the
|
||||
# `--global` container, whose `accounts/` leaf is locked down to 0700 just
|
||||
# below.
|
||||
find "${DOKKU_LIB_ROOT}/data/letsencrypt" -mindepth 1 -maxdepth 1 -type d \
|
||||
! -name '--global' -exec chmod 0755 {} +
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/letsencrypt/--global/accounts"
|
||||
chmod 0700 "${DOKKU_LIB_ROOT}/data/letsencrypt/--global/accounts"
|
||||
chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/letsencrypt"
|
||||
fn-plugin-property-setup "letsencrypt"
|
||||
fn-letsencrypt-migrate-properties
|
||||
|
||||
Reference in new issue
Block a user