File size: 725 Bytes
700c429 | 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 | # Use the official SearXNG image as a base
FROM searxng/searxng:latest
# HF Spaces runs containers as user 1000
# The searxng image already uses a non-root user, but we need to
# adjust ownership and port to match HF requirements.
USER root
# Copy our custom settings into the image
COPY searxng/settings.yml /etc/searxng/settings.yml
# Give the searxng user ownership of the config
RUN chown -R searxng:searxng /etc/searxng
USER searxng
# HF Spaces requires port 7860
EXPOSE 7860
# Override the default port via environment variable
ENV SEARXNG_PORT=7860
# Pass the secret key in at runtime via HF Space secret
# Set SEARXNG_SECRET in your Space settings → Variables & Secrets
CMD ["python", "-m", "searx.webapp"]
|