From 06f83cabcfe1ad8ae7802b571582491ab779c145 Mon Sep 17 00:00:00 2001 From: Dominik Erdmann Date: Sun, 11 Sep 2022 13:43:29 +0200 Subject: [PATCH] reuse morty's default config while Docker startup --- dockerfiles/docker-entrypoint.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dockerfiles/docker-entrypoint.sh b/dockerfiles/docker-entrypoint.sh index 127512ff7..b9112bae3 100755 --- a/dockerfiles/docker-entrypoint.sh +++ b/dockerfiles/docker-entrypoint.sh @@ -81,15 +81,16 @@ patch_searxng_settings() { # Morty configuration 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" \ + -e "s|# result_proxy:|result_proxy:|g" \ + -e "s|# url: http://127.0.0.1:3000/| url: ${MORTY_URL}|g" \ + -e "s|# # the key is a base64 encoded string| # the key is a base64 encoded string|g" \ + -e "s|# key: \!\!binary| key: \!\!binary|g" \ + -e "s/your_morty_proxy_key/${MORTY_KEY}/g" \ + -e "s|# # \[true| # \[true|g" \ + -e "s|# proxify_results: true| proxify_results: true|g" \ "${CONF}" - cat >> "${CONF}" <<-EOF - -# Morty configuration -result_proxy: - url: ${MORTY_URL} - key: !!binary "${MORTY_KEY}" -EOF fi }