Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
# Pull the base image
|
2 |
FROM ghcr.io/danny-avila/librechat-dev:latest
|
|
|
|
|
3 |
USER root
|
|
|
4 |
# Set environment variables
|
5 |
ENV HOST=0.0.0.0
|
6 |
ENV PORT=7860
|
@@ -10,16 +13,17 @@ ENV SEARCH=false
|
|
10 |
ENV MEILI_NO_ANALYTICS=true
|
11 |
ENV MEILI_HOST=https://librechat-meilisearch.hf.space
|
12 |
|
13 |
-
# Create necessary directories and
|
14 |
-
RUN mkdir -p /app/uploads/temp /app/client/public/images/temp /app/api/logs /app/data
|
15 |
chmod -R 777 /app/uploads/temp /app/client/public/images /app/api/logs /app/data
|
16 |
|
17 |
-
# Install dependencies
|
18 |
RUN cd /app/api && npm install
|
19 |
|
20 |
-
# Copy
|
21 |
COPY entrypoint.sh /app/entrypoint.sh
|
22 |
RUN chmod +x /app/entrypoint.sh
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
1 |
# Pull the base image
|
2 |
FROM ghcr.io/danny-avila/librechat-dev:latest
|
3 |
+
|
4 |
+
# Use root for setup
|
5 |
USER root
|
6 |
+
|
7 |
# Set environment variables
|
8 |
ENV HOST=0.0.0.0
|
9 |
ENV PORT=7860
|
|
|
13 |
ENV MEILI_NO_ANALYTICS=true
|
14 |
ENV MEILI_HOST=https://librechat-meilisearch.hf.space
|
15 |
|
16 |
+
# Create necessary directories and set permissions
|
17 |
+
RUN mkdir -p /app/uploads/temp /app/client/public/images/temp /app/api/logs /app/data && \
|
18 |
chmod -R 777 /app/uploads/temp /app/client/public/images /app/api/logs /app/data
|
19 |
|
20 |
+
# Install backend dependencies
|
21 |
RUN cd /app/api && npm install
|
22 |
|
23 |
+
# Copy startup script and make it executable
|
24 |
COPY entrypoint.sh /app/entrypoint.sh
|
25 |
RUN chmod +x /app/entrypoint.sh
|
26 |
+
RUN chown node /app/entrypoint.sh
|
27 |
+
USER node
|
28 |
+
# Run as root (or drop back to non-root if you want later)
|
29 |
+
CMD ["/app/entrypoint.sh"]
|