zyxciss commited on
Commit
7f71b97
·
verified ·
1 Parent(s): 5ab6744

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -2
Dockerfile CHANGED
@@ -1,11 +1,18 @@
1
  # Use the official SearXNG image
2
  FROM searxng/searxng:latest
3
 
4
- # Set the port for Hugging Face Spaces
5
  ENV PORT=7860
6
 
7
- # Expose the correct port
 
 
 
 
8
  EXPOSE 7860
9
 
 
 
 
10
  # Start SearXNG
11
  CMD ["gunicorn", "-b", "0.0.0.0:7860", "searx.webapp:app"]
 
1
  # Use the official SearXNG image
2
  FROM searxng/searxng:latest
3
 
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"]