Kaballas commited on
Commit
0fdec12
·
verified ·
1 Parent(s): a8f9828

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -40
Dockerfile CHANGED
@@ -1,40 +1,5 @@
1
- # Use the existing image for AnythingLLM as the base
2
- FROM mintplexlabs/anythingllm:render
3
-
4
- # Switch to root user for administrative tasks
5
- USER root
6
-
7
- # Create storage directory and link
8
- RUN mkdir -p /data/storage
9
- RUN ln -s /data/storage /storage
10
-
11
- # Set environment variables for storage and server port
12
- ENV STORAGE_DIR="/data/storage"
13
- ENV SERVER_PORT=7860
14
- ENV SQLITE_DATABASE="/data/storage/sqlite.db"
15
-
16
- # Install Python dependencies for sqlite-web
17
- RUN apt-get update && \
18
- apt-get install -y --no-install-recommends \
19
- python3-pip libsqlite3-dev && \
20
- pip3 install sqlite-web && \
21
- rm -rf /var/lib/apt/lists/*
22
-
23
- # Copy the custom backup script
24
- COPY copy-storage.sh /usr/local/bin/copy-storage.sh
25
-
26
- # Ensure the backup script has execution permissions
27
- RUN chmod +x /usr/local/bin/copy-storage.sh
28
-
29
- # Copy the entrypoint script to handle sqlite-web and AnythingLLM
30
- COPY entrypoint.sh /usr/local/bin/entrypoint.sh
31
- RUN chmod +x /usr/local/bin/entrypoint.sh
32
-
33
- # Switch back to AnythingLLM user
34
- USER anythingllm
35
-
36
- # Expose ports for AnythingLLM and sqlite-web
37
- EXPOSE $SERVER_PORT 8080
38
-
39
- # Set the entrypoint to the combined script
40
- ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
 
1
+ docker run -it --rm \
2
+ -p 8080:8080 \
3
+ -v /path/to/your-data:/data \
4
+ -e SQLITE_DATABASE=db_filename.db \
5
+ ghcr.io/coleifer/sqlite-web:latest