Subham9126 commited on
Commit
8e68541
·
verified ·
1 Parent(s): 38a0f07

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -10
Dockerfile CHANGED
@@ -1,19 +1,24 @@
1
  FROM requarks/wiki:2
2
 
3
- # --- Hardcoded Environment Variables ---
4
- # Tells Wiki.js to use SQLite
5
  ENV DB_TYPE=sqlite
6
- # Where to save the database file inside the container
7
  ENV DB_FILEPATH=/wiki/data/db.sqlite
8
- # The port HF Spaces expects
9
- ENV PORT=3000
10
 
11
- # Ensure the directory exists and is writable
 
 
 
 
12
  USER root
13
- RUN mkdir -p /wiki/data && chown -R node:node /wiki/data
14
 
15
- # Switch to the default node user for security
 
 
 
 
16
  USER node
17
 
18
- EXPOSE 3000
19
- CMD ["node", "server"]
 
 
1
  FROM requarks/wiki:2
2
 
3
+ # HF Spaces requires port 7860
4
+ ENV PORT=7860
5
  ENV DB_TYPE=sqlite
 
6
  ENV DB_FILEPATH=/wiki/data/db.sqlite
 
 
7
 
8
+ # Wiki.js also needs these to skip setup wizard
9
+ ENV DB_HOST=localhost
10
+ ENV WIKI_ADMIN_EMAIL=girisubham460@gmail.com
11
+ ENV WIKI_ADMIN_PASSWORD=Admin1234!
12
+
13
  USER root
 
14
 
15
+ # Create data directory and fix permissions
16
+ RUN mkdir -p /wiki/data && \
17
+ chown -R node:node /wiki/data && \
18
+ chown -R node:node /wiki
19
+
20
  USER node
21
 
22
+ EXPOSE 7860
23
+
24
+ CMD ["node", "server"]