mirror of
https://github.com/searxng/searxng.git
synced 2024-11-19 02:40:11 +01:00
docker: allow configuring http proxy via env variables
This commit is contained in:
parent
383e3cc554
commit
c1af891707
@ -12,6 +12,9 @@ RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx \
|
|||||||
&& echo 'sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml' >> run.sh \
|
&& echo 'sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml' >> run.sh \
|
||||||
&& echo 'sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml' >> run.sh \
|
&& echo 'sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml' >> run.sh \
|
||||||
&& echo 'sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml' >> run.sh \
|
&& echo 'sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml' >> run.sh \
|
||||||
|
&& echo 'if [ -n "$HTTP_PROXY_URL" ] || [ -n "$HTTPS_PROXY_URL" ]; then' >> run.sh \
|
||||||
|
&& echo ' sed -i "s~^# proxies :~ proxies:\\n http: ${HTTP_PROXY_URL}\\n https: ${HTTPS_PROXY_URL}\\n~" searx/settings.yml' >> run.sh \
|
||||||
|
&& echo 'fi' >> run.sh \
|
||||||
&& echo 'python searx/webapp.py' >> run.sh \
|
&& echo 'python searx/webapp.py' >> run.sh \
|
||||||
&& chmod +x run.sh
|
&& chmod +x run.sh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user