lancelotly commited on
Commit
0c37574
·
verified ·
1 Parent(s): 775a53a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -5
Dockerfile CHANGED
@@ -1,4 +1,24 @@
1
  FROM ghcr.io/danny-avila/librechat-dev:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  EXPOSE 3080
3
 
4
  # Set environment variables
@@ -7,8 +27,8 @@ ENV PORT=3080
7
  ENV SESSION_EXPIRY=900000
8
  ENV REFRESH_TOKEN_EXPIRY=604800000
9
 
10
- # Uncomment the following ENV to enable search
11
- # Feel free to clone our meilisearch space and update the URL with your own
12
 
13
  # Create necessary directories
14
  RUN mkdir -p /app/uploads/temp
@@ -16,18 +36,21 @@ RUN mkdir -p /app/client/public/images/temp
16
  RUN mkdir -p /app/api/logs/
17
  RUN mkdir -p /app/data
18
 
19
- # Give write permission to the directory
20
  RUN chmod -R 777 /app/uploads/temp
21
  RUN chmod -R 777 /app/client/public/images
22
  RUN chmod -R 777 /app/api/logs/
23
  RUN chmod -R 777 /app/data
24
 
25
  # Copy Custom Endpoints Config
26
- RUN curl -o /app/librechat.yaml https://raw.githubusercontent.com/fuegovic/lc-config-yaml/main/librechat-rw.yaml
27
  # COPY librechat.yaml /app/librechat.yaml # Uncomment this and comment out the previous line to use the local librechat.yaml
28
 
29
  # Install dependencies
30
  RUN cd /app/api && npm install
31
 
 
 
 
32
  # Command to run on container start
33
- CMD ["npm", "run", "backend"]
 
1
  FROM ghcr.io/danny-avila/librechat-dev:latest
2
+
3
+ # Meilisearch configuration
4
+ FROM getmeili/meilisearch:latest as meilisearch
5
+
6
+ # Set environment variables for Meilisearch
7
+ ENV MEILI_HTTP_ADDR=0.0.0.0:7700
8
+ ENV MEILI_NO_ANALYTICS=true
9
+
10
+ # Expose the default MeiliSearch HTTP port
11
+ EXPOSE 7700
12
+
13
+ # Create and set the MeiliSearch data directory
14
+ RUN mkdir -p /meili_data
15
+ RUN chmod -R 777 /meili_data
16
+ VOLUME ["/meili_data"]
17
+
18
+ # Librechat configuration
19
+ FROM ghcr.io/danny-avila/librechat-dev:latest
20
+
21
+ # Expose Librechat port
22
  EXPOSE 3080
23
 
24
  # Set environment variables
 
27
  ENV SESSION_EXPIRY=900000
28
  ENV REFRESH_TOKEN_EXPIRY=604800000
29
 
30
+ ENV SEARCH=true
31
+ ENV MEILI_HOST=http://localhost:7700
32
 
33
  # Create necessary directories
34
  RUN mkdir -p /app/uploads/temp
 
36
  RUN mkdir -p /app/api/logs/
37
  RUN mkdir -p /app/data
38
 
39
+ # Give write permission to the directories
40
  RUN chmod -R 777 /app/uploads/temp
41
  RUN chmod -R 777 /app/client/public/images
42
  RUN chmod -R 777 /app/api/logs/
43
  RUN chmod -R 777 /app/data
44
 
45
  # Copy Custom Endpoints Config
46
+ RUN curl -o /app/librechat.yaml https://raw.githubusercontent.com/fuegovic/lc-config-yaml/main/librechat-test.yaml
47
  # COPY librechat.yaml /app/librechat.yaml # Uncomment this and comment out the previous line to use the local librechat.yaml
48
 
49
  # Install dependencies
50
  RUN cd /app/api && npm install
51
 
52
+ # Copy Meilisearch container
53
+ COPY --from=meilisearch /meili_data /app/data
54
+
55
  # Command to run on container start
56
+ CMD ["npm", "run", "backend"]