|
@@ -1,12 +1,17 @@
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
export DOCKER_BUILDKIT=1
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+export CONFIG_PHP_TEMPLATE="$(pwd)/templates/config.php"
|
|
|
+export CONFIG_NGINX_TEMPLATE="$(pwd)/templates/nginx.conf"
|
|
|
+export CONFIG_OPEN_SEARCH_TEMPLATE="$(pwd)/templates/opensearch.xml"
|
|
|
+
|
|
|
|
|
|
|
|
|
export OPEN_SEARCH_TITLE="${OPEN_SEARCH_TITLE:-'LibreX'}"
|
|
@@ -52,3 +57,12 @@ export CURLOPT_CUSTOMREQUEST="${CURLOPT_CUSTOMREQUEST:-'GET'}"
|
|
|
export CURLOPT_MAXREDIRS=${CURLOPT_MAXREDIRS:-5}
|
|
|
export CURLOPT_TIMEOUT=${CURLOPT_TIMEOUT:-18}
|
|
|
export CURLOPT_VERBOSE=${CURLOPT_VERBOSE:-false}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+[[ ! -s ${CONFIG_PHP_TEMPLATE} ]] && cat '$(pwd)/config.php' | envsubst | AwkTrim > ${CONFIG_PHP_TEMPLATE}
|
|
|
+[[ ! -s ${CONFIG_NGINX_TEMPLATE} ]] && cat '$(pwd)/nginx.conf' | envsubst | AwkTrim > ${CONFIG_NGINX_TEMPLATE}
|
|
|
+[[ ! -s ${CONFIG_OPEN_SEARCH_TEMPLATE} ]] && cat '$(pwd)/opensearch.xml' | envsubst | AwkTrim > ${CONFIG_OPEN_SEARCH_TEMPLATE}
|
|
|
+
|
|
|
+
|
|
|
+function AwkTrim() { awk '{$1=$1};1' }
|