docker-compose 部署文件预览服务
1. docker-compose文件准备
- docker-compose-fileview.yml
version: '3.2'
services:
fileview:
image: keking/kkfileview:latest
container_name: fileview
restart: always
ports:
- "8012:8012"
environment:
KK_FILE_DIR: "/data/file" # 文件路径地址
# KK_BASE_URL: "https://aa.bb.com/preview" # 配置nginx方向代理转发需要用到,详见官方文档
# KK_CONTEXT_PATH: "/preview" # 配置nginx方向代理转发需要用到,详见官方文档
volumes:
- fileview_data:/data/file
deploy:
resources:
limits:
cpus: "1"
memory: 2G
volumes:
fileview_data:
driver: local
2. 部署
docker-compose -f docker-compose-fileview.yml up -d
3. 官方文档地址
kkFileView - 在线文件预览 (keking.cn)
标签:文件,compose,fileview,预览,kkFileView,docker,data From: https://www.cnblogs.com/JentZhang/p/17243247.html