# Use the official SQLite Web image as the base image #FROM ghcr.io/coleifer/sqlite-web:latest # Set environment variables #ENV STORAGE_DIR="/data/storage" #ENV SERVER_PORT=7860 #ENV SQLITE_DATABASE="${STORAGE_DIR}/anythingllm.db" # Expose the server port #EXPOSE ${SERVER_PORT} # Set the working directory #WORKDIR /data # Create the storage directory and set permissions #RUN mkdir -p ${STORAGE_DIR} && chmod -R 777 ${STORAGE_DIR} # Command to run SQLite Web using the correct option for specifying the database file #CMD sqlite_web --host=0.0.0.0 --port=${SERVER_PORT} ${SQLITE_DATABASE} FROM mintplexlabs/anythingllm:render USER root # Create storage directory and link RUN mkdir -p /data/storage RUN ln -s /data/storage /storage # Switch to user for AnythingLLM USER anythingllm # Set environment variables for storage and server port ENV STORAGE_DIR="/data/storage" ENV SERVER_PORT=7860 # Copy the custom script to handle the backup COPY copy-storage.sh /usr/local/bin/copy-storage.sh # Ensure the script has execution permissions USER root RUN chmod +x /usr/local/bin/copy-storage.sh # Switch back to the anythingllm user USER anythingllm # Set the entry point to run the script and the main application ENTRYPOINT ["/bin/bash","/usr/local/bin/render-entrypoint.sh"]