Merge pull request #6121 from dokku/openresty-missing-funcs

Add missing error-log-path function to openresty plugin
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2023-08-19 19:02:04 -04:00
commit 5cbeb326d6
2 files changed
+13 -1

No files matched your search

@@ -100,12 +100,16 @@ trigger-openresty-vhosts-docker-args-process-deploy() {
value="$(fn-openresty-access-log-format "$APP")" value="$(fn-openresty-access-log-format "$APP")"
[[ -n "$value" ]] && output="$output '--label=openresty.access-log-format=$value'" [[ -n "$value" ]] && output="$output '--label=openresty.access-log-format=$value'"
value="$(fn-openresty-access-log-path "$APP")"
[[ -n "$value" ]] && output="$output '--label=openresty.access-log-path=$value'"
value="$(fn-openresty-bind-address-ipv4 "$APP")" value="$(fn-openresty-bind-address-ipv4 "$APP")"
[[ -n "$value" ]] && output="$output '--label=openresty.bind-address-ipv4=$value'" [[ -n "$value" ]] && output="$output '--label=openresty.bind-address-ipv4=$value'"
value="$(fn-openresty-bind-address-ipv6 "$APP")" value="$(fn-openresty-bind-address-ipv6 "$APP")"
[[ -n "$value" ]] && output="$output '--label=openresty.bind-address-ipv6=$value'" [[ -n "$value" ]] && output="$output '--label=openresty.bind-address-ipv6=$value'"
value="$(fn-openresty-client-max-body-size "$APP")" value="$(fn-openresty-client-max-body-size "$APP")"
[[ -n "$value" ]] && output="$output '--label=openresty.client-max-body-size=$value'" [[ -n "$value" ]] && output="$output '--label=openresty.client-max-body-size=$value'"
value="$(fn-openresty-error-log-path "$APP")"
[[ -n "$value" ]] && output="$output '--label=openresty.error-log-path=$value'"
value="$(fn-openresty-hsts-include-subdomains "$APP")" value="$(fn-openresty-hsts-include-subdomains "$APP")"
[[ -n "$value" ]] && output="$output '--label=openresty.hsts-include-subdomains=$value'" [[ -n "$value" ]] && output="$output '--label=openresty.hsts-include-subdomains=$value'"
value="$(fn-openresty-hsts-max-age "$APP")" value="$(fn-openresty-hsts-max-age "$APP")"
+9 -1
View File
@@ -47,6 +47,14 @@ fn-openresty-client-max-body-size() {
fn-plugin-property-get-default "openresty" "$APP" "client-max-body-size" "" fn-plugin-property-get-default "openresty" "$APP" "client-max-body-size" ""
} }
fn-openresty-error-log-path() {
declare desc="get the configured error log path"
declare APP="$1"
local OPENRESTY_LOG_ROOT="$(fn-openresty-log-root)"
fn-plugin-property-get-default "openresty" "$APP" "error-log-path" "${OPENRESTY_LOG_ROOT}/${APP}-error.log"
}
fn-openresty-get-http-includes-dir() { fn-openresty-get-http-includes-dir() {
declare desc="get any include dir if available" declare desc="get any include dir if available"
declare APP="$1" declare APP="$1"
@@ -102,7 +110,7 @@ fn-openresty-letsencrypt-server() {
fn-openresty-log-root() { fn-openresty-log-root() {
declare desc="get the openresty log root" declare desc="get the openresty log root"
local OPENRESTY_LOG_ROOT="/var/log/openresty" local OPENRESTY_LOG_ROOT="/var/log/nginx"
echo "$OPENRESTY_LOG_ROOT" echo "$OPENRESTY_LOG_ROOT"
} }