blob: 99b22fcc2fc07c820e2267593f1926cc3e575a34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
FROM ghcr.io/searxng/base:searxng-builder AS builder
COPY ./requirements*.txt ./
ARG TIMESTAMP="0"
RUN --mount=type=cache,id=uv,target=/root/.cache/uv set -eux; \
uv venv; \
uv pip install --no-managed-python --compile-bytecode --requirements ./requirements.txt --requirements ./requirements-server.txt; \
uv cache prune --ci; \
find ./.venv/ -exec touch -h -t $TIMESTAMP {} +
COPY ./searx/ ./searx/
ARG TIMESTAMP_SETTINGS="0"
RUN set -eux; \
python -m compileall -q ./searx/; \
touch -c -t $TIMESTAMP_SETTINGS ./searx/settings.yml; \
find ./searx/static/ -type f \
\( -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.svg" \) \
-exec gzip -9 -k {} + \
-exec brotli -9 -k {} + \
-exec gzip --test {}.gz + \
-exec brotli --test {}.br +; \
# Move always changing files to /usr/local/searxng/
mv ./searx/version_frozen.py ./
|