From 0fb423ea59f08c1294e9651da49edd27467f80a0 Mon Sep 17 00:00:00 2001 From: 3nprob <3nprob@3nprob> Date: Thu, 8 Apr 2021 12:51:50 +0900 Subject: [PATCH] Allow overriding env vars SEARX_SETTINGS_PATH,UWSGI_SETTINGS_PATH --- Dockerfile | 4 +++- dockerfiles/docker-entrypoint.sh | 3 --- utils/searx.sh | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d1a5632b5..3fbf62f35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,9 @@ ENV INSTANCE_NAME=searx \ AUTOCOMPLETE= \ BASE_URL= \ MORTY_KEY= \ - MORTY_URL= + MORTY_URL= \ + SEARX_SETTINGS_PATH=/etc/searx/settings.yml \ + UWSGI_SETTINGS_PATH=/etc/searx/uwsgi.ini WORKDIR /usr/local/searx diff --git a/dockerfiles/docker-entrypoint.sh b/dockerfiles/docker-entrypoint.sh index accc015f7..6592b1c70 100755 --- a/dockerfiles/docker-entrypoint.sh +++ b/dockerfiles/docker-entrypoint.sh @@ -24,9 +24,6 @@ if [ -z "${BIND_ADDRESS}" ]; then export BIND_ADDRESS="${DEFAULT_BIND_ADDRESS}" fi -export UWSGI_SETTINGS_PATH=/etc/searx/uwsgi.ini -export SEARX_SETTINGS_PATH=/etc/searx/settings.yml - # Parse special command line # see docs/admin/installation-docker.rst # display the help message without the version diff --git a/utils/searx.sh b/utils/searx.sh index ed015bdd2..d2dbe79b6 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -35,7 +35,7 @@ SERVICE_GROUP="${SERVICE_USER}" GIT_BRANCH="${GIT_BRANCH:-master}" SEARX_PYENV="${SERVICE_HOME}/searx-pyenv" SEARX_SRC="${SERVICE_HOME}/searx-src" -SEARX_SETTINGS_PATH="/etc/searx/settings.yml" +SEARX_SETTINGS_PATH="${SEARX_SETTINGS_PATH:-/etc/searx/settings.yml}" SEARX_SETTINGS_TEMPLATE="${SEARX_SETTINGS_TEMPLATE:-${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml}" SEARX_UWSGI_APP="searx.ini" # shellcheck disable=SC2034