mirror of https://github.com/searxng/searxng.git
Merge pull request #877 from return42/fix-876
[fix] docker generated new settings.yml does not work
This commit is contained in:
commit
8aba858057
|
@ -71,23 +71,24 @@ patch_searxng_settings() {
|
||||||
export BASE_URL="${BASE_URL%/}/"
|
export BASE_URL="${BASE_URL%/}/"
|
||||||
|
|
||||||
# update settings.yml
|
# update settings.yml
|
||||||
sed -i -e "s|base_url : False|base_url : ${BASE_URL}|g" \
|
sed -i \
|
||||||
-e "s/instance_name : \"searxng\"/instance_name : \"${INSTANCE_NAME}\"/g" \
|
-e "s|base_url: false|base_url: ${BASE_URL}|g" \
|
||||||
-e "s/autocomplete : \"\"/autocomplete : \"${AUTOCOMPLETE}\"/g" \
|
-e "s/instance_name: \"SearXNG\"/instance_name: \"${INSTANCE_NAME}\"/g" \
|
||||||
|
-e "s/autocomplete: \"\"/autocomplete: \"${AUTOCOMPLETE}\"/g" \
|
||||||
-e "s/ultrasecretkey/$(openssl rand -hex 32)/g" \
|
-e "s/ultrasecretkey/$(openssl rand -hex 32)/g" \
|
||||||
"${CONF}"
|
"${CONF}"
|
||||||
|
|
||||||
# Morty configuration
|
# Morty configuration
|
||||||
|
|
||||||
if [ -n "${MORTY_KEY}" ] && [ -n "${MORTY_URL}" ]; then
|
if [ -n "${MORTY_KEY}" ] && [ -n "${MORTY_URL}" ]; then
|
||||||
sed -i -e "s/image_proxy : False/image_proxy : True/g" \
|
sed -i -e "s/image_proxy: false/image_proxy: true/g" \
|
||||||
"${CONF}"
|
"${CONF}"
|
||||||
cat >> "${CONF}" <<-EOF
|
cat >> "${CONF}" <<-EOF
|
||||||
|
|
||||||
# Morty configuration
|
# Morty configuration
|
||||||
result_proxy:
|
result_proxy:
|
||||||
url : ${MORTY_URL}
|
url: ${MORTY_URL}
|
||||||
key : !!binary "${MORTY_KEY}"
|
key: !!binary "${MORTY_KEY}"
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue