initial commit

This commit is contained in:
Wonderfall
2016-04-11 15:59:32 +02:00
commit 13f2d49927
85 changed files with 4343 additions and 0 deletions

49
searx/Dockerfile Normal file
View File

@ -0,0 +1,49 @@
FROM alpine:3.3
MAINTAINER Wonderfall <wonderfall@mondedie.fr>
ENV BASE_URL=False IMAGE_PROXY=False
RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk -U add \
build-base \
python \
python-dev \
py-pip \
libxml2 \
libxml2-dev \
libxslt \
libxslt-dev \
libffi-dev \
openssl \
openssl-dev \
ca-certificates \
tar \
tini@commuedge \
&& pip install --no-cache -r https://raw.githubusercontent.com/asciimoo/searx/master/requirements.txt \
&& apk del \
build-base \
python-dev \
py-pip \
libffi-dev \
libxslt-dev \
libxml2-dev \
openssl-dev \
ca-certificates \
&& rm -f /var/cache/apk/*
RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx
COPY run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh
USER searx
WORKDIR /usr/local/searx
RUN wget -qO- https://github.com/asciimoo/searx/archive/master.tar.gz | tar xz --strip 1 \
&& sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml
EXPOSE 8888
LABEL description "A powerful meta-search engine"
CMD ["tini","--","run.sh"]

31
searx/README.md Normal file
View File

@ -0,0 +1,31 @@
## wonderfall/searx
[![](https://badge.imagelayers.io/wonderfall/searx:latest.svg)](https://imagelayers.io/?images=wonderfall/searx:latest 'Get your own badge on imagelayers.io')
![](https://i.goopics.net/ls.png)
#### What is searx?
Searx is a metasearch engine, inspired by the seeks project.
It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, Searx uses the search bar to perform GET requests. Searx can be added to your browser's search bar; moreover, it can be set as the default search engine.
#### Tags
- `latest` : latest code from [asciimoo/searx](https://github.com/asciimoo/searx)
- `release`, `0.8.1` : latest stable released
#### Secret key
When the container starts the first time, it generates a new secret key. It doesn't depend on the build, so no one can know your key.
#### Environment variables
- **IMAGE_PROXY** is a boolean value (True or False, False by default), it can enable proxying through the searx instance (useful for public instances because it doesn't break TLS connection).
- **BASE_URL** should be set if searx is used behind a custom domain name (http address or False, False by default).
#### Docker Compose (example)
```
searx:
image: wonderfall/searx:latest
environment:
- BASE_URL="https://searx.domain.tld"
- IMAGE_PROXY=True
```
#### Reverse proxy
https://github.com/Wonderfall/dockerfiles/tree/master/reverse

5
searx/run.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml
sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml
sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
python searx/webapp.py