sam-fritz commited on
Commit
1ccab96
·
verified ·
1 Parent(s): e067ab2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -12
Dockerfile CHANGED
@@ -2,19 +2,28 @@ FROM mintplexlabs/anythingllm:latest
2
 
3
  USER root
4
 
5
- RUN mkdir -p /app/server/storage /app/local_data && \
6
- chown -R 1000:1000 /app/server/storage /app/local_data && \
7
- chmod -R 777 /app/server/storage /app/local_data
8
-
9
- ENV STORAGE_DIR=/app/local_data
10
 
 
 
 
11
  ENV SERVER_PORT=7860
 
12
  EXPOSE 7860
13
 
14
- USER 1000
15
- CMD ["/bin/bash", "-c", "mkdir -p /app/server/storage/documents /app/server/storage/vector-cache /app/server/storage/models && \
16
- ln -sf /app/server/storage/documents /app/local_data/documents && \
17
- ln -sf /app/server/storage/vector-cache /app/local_data/vector-cache && \
18
- ln -sf /app/server/storage/models /app/local_data/models && \
19
- chmod -R 777 /app/server/storage && \
20
- /usr/local/bin/docker-entrypoint.sh"]
 
 
 
 
 
 
 
 
 
2
 
3
  USER root
4
 
5
+ RUN mkdir -p /collector/hotdir && \
6
+ chmod -R 777 /collector
 
 
 
7
 
8
+ ENV JWT_SECRET="my-random-secret-key-123"
9
+ # Point AnythingLLM's core storage to your persistent SSD volume
10
+ ENV STORAGE_DIR=/data/storage
11
  ENV SERVER_PORT=7860
12
+
13
  EXPOSE 7860
14
 
15
+ ENTRYPOINT ["/bin/bash", "-c"]
16
+
17
+ # 1. Create the persistent and bucket folders
18
+ # 2. Handle the .env file exactly like your old script
19
+ # 3. Symlink ONLY the documents/vector-cache from the SSD to the bucket
20
+ # 4. Boot the app
21
+ CMD ["mkdir -p /data/storage /app/server/storage/documents /app/server/storage/vector-cache && \
22
+ chmod -R 777 /data/storage /app/server/storage && \
23
+ if [ ! -f /data/storage/.env ]; then cp /app/server/.env /data/storage/.env; fi && \
24
+ rm -f /app/server/.env && \
25
+ ln -sf /data/storage/.env /app/server/.env && \
26
+ ln -sfn /app/server/storage/documents /data/storage/documents && \
27
+ ln -sfn /app/server/storage/vector-cache /data/storage/vector-cache && \
28
+ echo 'Storage and .env linked. Starting App...' && \
29
+ exec /usr/local/bin/docker-entrypoint.sh"]