on master help sign in
:whale: Config for instance name and autocomplete

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>

commit2485d41bdd59fb820241241769ea9ad833ea470c authormathieu.brunot <mathieu.brunot@monogramm.io> dateMon 14 Oct 2019, 02:02 (7 years ago) parent8e62f76
2 files changed+7−1
Dockerfile+3−1 dockerfiles/docker-entrypoint.sh+4
Dockerfile+3−1
@@ -11,7 +11,9 @@ ARG TIMESTAMP_UWSGI=0
1111ARG LABEL_VCS_REF=
1212ARG LABEL_VCS_URL=
1313
14−ENV BASE_URL= \
14+ENV INSTANCE_NAME=searx \
15+ AUTOCOMPLETE= \
16+ BASE_URL= \
1517 MORTY_KEY= \
1618 MORTY_URL=
1719EXPOSE 8080
dockerfiles/docker-entrypoint.sh+4
@@ -29,6 +29,8 @@ do
2929 printf " -f Always update on the configuration files (existing files are renamed with the .old suffix)\n"
3030 printf " Without this option, new configuration files are copied with the .new suffix\n"
3131 printf "\nEnvironment variables:\n\n"
32+ printf " INSTANCE_NAME settings.yml : general.instance_name\n"
33+ printf " AUTOCOMPLETE settings.yml : search.autocomplete\n"
3234 printf " BASE_URL settings.yml : server.base_url\n"
3335 printf " MORTY_URL settings.yml : result_proxy.url\n"
3436 printf " MORTY_KEY settings.yml : result_proxy.key\n"
@@ -53,6 +55,8 @@ patch_searx_settings() {
5355
5456 # update settings.yml
5557 sed -i -e "s|base_url : False|base_url : ${BASE_URL}|g" \
58+ -e "s/instance_name : \"searx\"/instance_name : \"${INSTANCE_NAME}\"/g" \
59+ -e "s/autocomplete : \"\"/autocomplete : \"${AUTOCOMPLETE}\"/g" \
5660 -e "s/ultrasecretkey/$(openssl rand -hex 32)/g" \
5761 "${CONF}"
5862