zyxciss commited on
Commit
9aaee71
·
verified ·
1 Parent(s): 7f71b97

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -4,15 +4,20 @@ FROM searxng/searxng:latest
4
  # Set environment variables
5
  ENV PORT=7860
6
 
7
- # Ensure /etc/searxng is writable
8
  USER root
 
 
9
  RUN mkdir -p /etc/searxng && chmod -R 777 /etc/searxng
10
 
11
- # Expose the correct port for Hugging Face Spaces
12
- EXPOSE 7860
13
 
14
  # Switch back to non-root user for security
15
  USER searxng
16
 
 
 
 
17
  # Start SearXNG
18
  CMD ["gunicorn", "-b", "0.0.0.0:7860", "searx.webapp:app"]
 
4
  # Set environment variables
5
  ENV PORT=7860
6
 
7
+ # Switch to root to modify permissions
8
  USER root
9
+
10
+ # Ensure /etc/searxng is writable
11
  RUN mkdir -p /etc/searxng && chmod -R 777 /etc/searxng
12
 
13
+ # Create a basic limiter.toml file to remove warnings
14
+ RUN echo "[rate_limit]\nrequests_per_minute = 60" > /etc/searxng/limiter.toml
15
 
16
  # Switch back to non-root user for security
17
  USER searxng
18
 
19
+ # Expose the correct port for Hugging Face Spaces
20
+ EXPOSE 7860
21
+
22
  # Start SearXNG
23
  CMD ["gunicorn", "-b", "0.0.0.0:7860", "searx.webapp:app"]