diff options
author | Alexandre Flament <alex@al-f.net> | 2020-09-19 16:04:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-19 16:04:07 +0200 |
commit | 4cc8644ec918461371f61007bc0e50e44620fc69 (patch) | |
tree | d4b7a71519e56746cce4cb7248501785049e93d8 /Dockerfile | |
parent | 375cbd12b34ac08ae350c9d48881d29cb643e734 (diff) | |
parent | dc8d9750515054885da354a82f1a0e4ab9572bab (diff) | |
download | searxng-4cc8644ec918461371f61007bc0e50e44620fc69.tar.gz searxng-4cc8644ec918461371f61007bc0e50e44620fc69.zip |
Merge pull request #1865 from dalf/uwsgi_static
[enh] Docker image: uwsgi serves the static files directly.
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile index b750031cb..3894aa968 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,6 +52,7 @@ RUN apk upgrade --no-cache \ tini \ uwsgi \ uwsgi-python3 \ + brotli \ && pip3 install --upgrade pip \ && pip3 install --no-cache -r requirements.txt \ && apk del build-dependencies \ @@ -64,8 +65,10 @@ RUN su searx -c "/usr/bin/python3 -m compileall -q searx"; \ touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \ if [ ! -z $VERSION_GITCOMMIT ]; then\ echo "VERSION_STRING = VERSION_STRING + \"-$VERSION_GITCOMMIT\"" >> /usr/local/searx/searx/version.py; \ - fi - + fi; \ + find /usr/local/searx/searx/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \ + -o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \ + -type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+ # Keep this argument at the end since it change each time ARG LABEL_DATE= |