Update Dockerfile
Browse files- Dockerfile +12 -2
Dockerfile
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
|
|
| 1 |
FROM requarks/wiki:2
|
| 2 |
|
| 3 |
-
#
|
| 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"]
|