Subham9126 commited on
Commit
852e2b6
·
verified ·
1 Parent(s): 8ecfcfe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -2
Dockerfile CHANGED
@@ -1,7 +1,17 @@
 
1
  FROM requarks/wiki:2
2
 
3
- # Fix for Supabase SSL Certificate issues
4
- ENV NODE_TLS_REJECT_UNAUTHORIZED=0
5
  ENV PORT=7860
 
6
 
 
 
 
 
 
 
 
 
 
7
  CMD ["node", "server"]
 
1
+ # Use the official Wiki.js version 2 image
2
  FROM requarks/wiki:2
3
 
4
+ # Hugging Face Spaces strictly require the app to listen on port 7860
 
5
  ENV PORT=7860
6
+ EXPOSE 7860
7
 
8
+ # Hugging Face Spaces execute containers as a non-root user (UID 1000).
9
+ # Wiki.js needs write access to its own directory for the setup wizard, logs, and cache.
10
+ USER root
11
+ RUN chown -R 1000:1000 /wiki
12
+
13
+ # Switch to the Hugging Face user
14
+ USER 1000
15
+
16
+ # Start the Wiki.js server
17
  CMD ["node", "server"]