# Skworm = SearXNG with Skworm's name, worm logo, home page and tabs baked in.
FROM searxng/searxng:latest
ARG S=/usr/local/searxng/searx
COPY brand/index.html brand/categories.html $S/templates/simple/
COPY brand/wordmark.svg $S/templates/simple/searxng-wordmark.min.svg
COPY brand/skworm.svg $S/static/themes/simple/img/searxng.svg
COPY brand/skworm.png $S/static/themes/simple/img/searxng.png
COPY brand/icon.svg $S/static/themes/simple/img/favicon.svg
COPY brand/bg/ $S/static/themes/simple/img/bg/
COPY brand/favicon.png brand/192.png brand/512.png $S/static/themes/simple/img/
# remove SearXNG's pre-compressed copies of the files we replaced, so browsers always get Skworm's
RUN rm -f $S/static/themes/simple/img/searxng.svg.* $S/static/themes/simple/img/favicon.svg.*
# "Skworm" everywhere visitors look; About page; our source for the AGPL "Source code" link
COPY rebrand.py brand/about.md /tmp/
COPY skworm-source.tar.gz $S/static/themes/simple/
RUN python3 /tmp/rebrand.py && rm /tmp/rebrand.py /tmp/about.md
