Spaces:
Sleeping
Sleeping
Add Dockerfile for AnythingLLM
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM mintplexlabs/anythingllm:latest
|
| 2 |
+
|
| 3 |
+
# Switch to root to fix permissions
|
| 4 |
+
USER root
|
| 5 |
+
|
| 6 |
+
# Create the storage directory and give the default user (1000) access
|
| 7 |
+
# Hugging Face runs as user 1000 by default
|
| 8 |
+
RUN mkdir -p /app/server/storage && \
|
| 9 |
+
chown -R 1000:1000 /app/server/storage && \
|
| 10 |
+
chmod -R 777 /app/server/storage
|
| 11 |
+
|
| 12 |
+
# Set environment variables
|
| 13 |
+
# SERVER_PORT tells AnythingLLM to listen on 7860 (Hugging Face's default port)
|
| 14 |
+
ENV SERVER_PORT=7860
|
| 15 |
+
# STORAGE_DIR ensures data goes to the writable folder we made
|
| 16 |
+
ENV STORAGE_DIR="/app/server/storage"
|
| 17 |
+
|
| 18 |
+
# Expose the port Hugging Face expects
|
| 19 |
+
EXPOSE 7860
|
| 20 |
+
|
| 21 |
+
# Switch back to the non-root user for security
|
| 22 |
+
USER 1000
|
| 23 |
+
|
| 24 |
+
# Start the application
|
| 25 |
+
ENTRYPOINT ["/bin/bash", "/usr/local/bin/docker-entrypoint.sh"]
|
| 26 |
+
CMD ["/usr/local/bin/docker-entrypoint.sh", "composer", "start"]
|