Prechádzať zdrojové kódy

fix 02-check-config.sh logic and bad .env.docker syntax

Christian Winther 1 rok pred
rodič
commit
c859367e10

+ 2 - 2
.env.docker

@@ -1102,10 +1102,10 @@ DOCKER_WORKER_HEALTHCHECK_INTERVAL="${DOCKER_ALL_DEFAULT_HEALTHCHECK_INTERVAL}"
 ################################################################################
 
 # Set this to a non-empty value (e.g. "disabled") to disable the [proxy] and [proxy-acme] service
-#DOCKER_PROXY_PROFILE=""
+DOCKER_PROXY_PROFILE=""
 
 # Set this to a non-empty value (e.g. "disabled") to disable the [proxy-acme] service
-DOCKER_PROXY_ACME_PROFILE="${DOCKER_PROXY_PROFILE:-}"
+DOCKER_PROXY_ACME_PROFILE="${DOCKER_PROXY_PROFILE}"
 
 # How often Docker health check should run for [proxy] service
 DOCKER_PROXY_HEALTHCHECK_INTERVAL="${DOCKER_ALL_DEFAULT_HEALTHCHECK_INTERVAL}"

+ 2 - 3
docker/shared/root/docker/entrypoint.d/02-check-config.sh

@@ -8,11 +8,10 @@ entrypoint-set-script-name "$0"
 
 # Validating dot-env files for any issues
 for file in "${dot_env_files[@]}"; do
-    if file-exists "$file"; then
+    if ! file-exists "${file}"; then
         log-warning "Could not source file [${file}]: does not exists"
         continue
     fi
 
-    log-info "Linting dotenv file ${file}"
-    dotenv-linter --skip=QuoteCharacter --skip=UnorderedKey "${file}"
+    run-as-current-user dotenv-linter --skip=QuoteCharacter --skip=UnorderedKey "${file}"
 done