tkgray commited on
Commit
c2aafe4
·
verified ·
1 Parent(s): f355e4e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -2
Dockerfile CHANGED
@@ -1,7 +1,34 @@
1
- # Use the provided image as the base
2
  FROM itzcrazykns1337/vane:latest
3
 
4
- # Hugging Face Spaces requires the app to run on port 7860
5
  ENV PORT=7860
 
 
6
  EXPOSE 7860
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM itzcrazykns1337/vane:latest
2
 
3
+ # HF Spaces requires port 7860 and binding to all interfaces
4
  ENV PORT=7860
5
+ ENV HOSTNAME=0.0.0.0
6
+ ENV DATA_DIR=/home/vane
7
  EXPOSE 7860
8
 
9
+ # Ensure persistent directories exist with loose permissions
10
+ # The Storage Bucket will be mounted OVER /home/vane/data at runtime
11
+ RUN mkdir -p /home/vane/data /home/vane/uploads && \
12
+ chmod -R 777 /home/vane/data /home/vane/uploads
13
+
14
+ # Wrapper script: ensures bucket-mounted dirs are writable, then starts Vane + SearxNG
15
+ COPY <<'EOF' /usr/local/bin/start-persistent.sh
16
+ #!/bin/bash
17
+ set -e
18
+
19
+ # Re-ensure dirs exist in case empty bucket was mounted over them
20
+ mkdir -p /home/vane/data
21
+ chmod 777 /home/vane/data
22
+ mkdir -p /home/vane/uploads
23
+ chmod 777 /home/vane/uploads
24
+
25
+ echo "Vane data dir state:"
26
+ ls -la /home/vane/data/ 2>/dev/null || echo "(empty — will init on first run)"
27
+
28
+ # Execute the original bundled entrypoint (starts SearxNG on :8080 + Vane app)
29
+ exec /home/vane/entrypoint.sh
30
+ EOF
31
+
32
+ RUN chmod +x /usr/local/bin/start-persistent.sh
33
+
34
+ CMD ["/usr/local/bin/start-persistent.sh"]