Docker环境下anythingllm 对接minio
s3fs将minio存储桶挂载到本地/minio-mount。启动anythingllm容器,挂载卷。
·
minio挂载到本地需要的工具:
sudo apt-get install fuse
sudo apt-get install s3fs
创建存储凭证文件:
echo "ACCESSKEY:SECRETKEY" > ~/.passwd-s3fs #具体内容自行替换
chmod 600 ~/.passwd-s3fs
本地创建挂载点:
mkdir /minio-mount
s3fs将minio存储桶挂载到本地/minio-mount
s3fs deepseek /minio-mount -o use_path_request_style -o passwd_file=/home/test/minio/.passwd-s3fs -o url=http://1.1.1.1:9000 -o allow_other -o umask=000
启动anythingllm容器,挂载卷
docker run -d -p 3001:3001 \
--name anythingllm_minio \
--network host \
-e STORAGE_DIR="/app/server/storage" \
-e STORAGE_PROVIDER="minio" \
-e MINIO_ENDPOINT="http://1.1.1.1:9000" \
-e MINIO_ACCESS_KEY="111111" \
-e MINIO_SECRET_KEY="11111111" \
-e MINIO_BUCKET_NAME="deepseek" \
-v /minio-mount/server/storage:/app/server/storage \
-v /minio-mount/collector/hotdir/:/app/collector/hotdir \
-v /minio-mount/collector/outputs/:/app/collector/outputs \
mintplexlabs/anythingllm
version: '3.8' #docker compose文件启动
services:
anythingllm-minio:
image: mintplexlabs/anythingllm
container_name: anythingllm_minio
network_mode: host # 使用宿主机网络,与 --network host 等效
environment:
- STORAGE_DIR=/app/server/storage
- STORAGE_PROVIDER=minio
- MINIO_ENDPOINT=http://1.1.1.1:9000 # MinIO 服务地址
- MINIO_ACCESS_KEY=1111 # 替换为实际 Access Key
- MINIO_SECRET_KEY=111111 # 替换为实际 Secret Key
- MINIO_BUCKET_NAME=deepseek # MinIO 存储桶名称
volumes:
- /minio-mount/server/storage:/app/server/storage # 文档存储路径
- /minio-mount/collector/hotdir:/app/collector/hotdir # 热目录挂载
- /minio-mount/collector/outputs:/app/collector/outputs # 输出目录挂载
ports:
- "3001:3001" # AnythingLLM Web 服务端口
restart: unless-stopped # 容器异常退出时自动重启
更多推荐
所有评论(0)