adowu commited on
Commit
0817f51
·
verified ·
1 Parent(s): 2144a78

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -19
Dockerfile CHANGED
@@ -1,25 +1,23 @@
1
  FROM python:3.12
2
 
3
- RUN apt-get update && apt-get install -y
4
- build-essential
5
- libxslt-dev
6
- zlib1g-dev
7
- libffi-dev
8
- libssl-dev
9
- && rm -rf /var/lib/apt/lists/*
10
 
11
- RUN pip install --no-cache-dir
12
- searx
13
- wheel
14
- setuptools
15
- pyyaml
16
- babel
17
- uwsgi
18
- gunicorn
 
 
19
 
20
- COPY ./searx.conf /etc/searx/searx.conf
21
  COPY ./settings.yml /etc/searx/settings.yml
22
 
23
- USER searx
24
- WORKDIR /searx
25
- CMD ["gunicorn", "-b", ":8080", "--access-logfile", "-", "--error-logfile", "-", "searx.wsgi:application"]
 
1
  FROM python:3.12
2
 
3
+ RUN apt-get update && apt-get install -y \
4
+ python3-dev python3-babel python3-venv \
5
+ uwsgi uwsgi-plugin-python3 \
6
+ git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev \
7
+ shellcheck
 
 
8
 
9
+ USER searx
10
+ WORKDIR /usr/local/searx
11
+
12
+ COPY ./searx-src /usr/local/searx/searx-src
13
+ RUN git -C /usr/local/searx/searx-src clone <https://github.com/searx/searx.git>
14
+ RUN python3 -m venv /usr/local/searx/searx-pyenv \
15
+ && echo '. /usr/local/searx/searx-pyenv/bin/activate' >> /usr/local/searx/.profile \
16
+ && source /usr/local/searx/.profile \
17
+ && pip install -U pip setuptools wheel pyyaml \
18
+ && pip install -e /usr/local/searx/searx-src
19
 
20
+ ENV SEARX_SETTINGS_PATH=/etc/searx/settings.yml
21
  COPY ./settings.yml /etc/searx/settings.yml
22
 
23
+ CMD ["uwsgi", "--emperor", "/etc/searx/conf.d"]