martynka commited on
Commit
b59e002
·
verified ·
1 Parent(s): a76f64d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -14
Dockerfile CHANGED
@@ -1,8 +1,8 @@
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
@@ -10,19 +10,29 @@ ENV PORT=7860
10
  ENV SESSION_EXPIRY=900000
11
  ENV REFRESH_TOKEN_EXPIRY=604800000
12
  ENV SEARCH=false
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 777 /app/entrypoint.sh
26
- USER node
27
- # Run as root (or drop back to non-root if you want later)
28
- CMD ["/app/entrypoint.sh"]
 
1
  # Pull the base image
2
  FROM ghcr.io/danny-avila/librechat-dev:latest
3
 
4
+ # FROM ghcr.io/danny-avila/librechat-dev:0a1d38e3189a4f905d021be41ac2c8b5bd03d8b7
5
+
6
 
7
  # Set environment variables
8
  ENV HOST=0.0.0.0
 
10
  ENV SESSION_EXPIRY=900000
11
  ENV REFRESH_TOKEN_EXPIRY=604800000
12
  ENV SEARCH=false
13
+ # ENV MEILI_NO_ANALYTICS=true
14
+ # ENV MEILI_HOST=https://librechat-meilisearch.hf.space
15
+
16
+ # Create necessary directories
17
+ RUN mkdir -p /app/uploads/temp
18
+ RUN mkdir -p /app/client/public/images/temp
19
+ RUN mkdir -p /app/api/logs/
20
+ RUN mkdir -p /app/data
21
+
22
+ # Give write permission to the directory
23
+ RUN chmod -R 777 /app/uploads/temp
24
+ RUN chmod -R 777 /app/client/public/images
25
+ RUN chmod -R 777 /app/api/logs/
26
+ RUN chmod -R 777 /app/data
27
 
 
 
 
28
 
29
+ # Copy Custom Endpoints Config
30
+ user root
31
+ apk add curl
32
+ RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true && RUN curl -o /app/librechat.yaml $(cat /secrets/CONFIG_PATH)
33
+ user node
34
+ # Install dependencies
35
  RUN cd /app/api && npm install
36
 
37
+ # Command to run on container start
38
+ CMD ["npm", "run", "backend"]