赞
踩
新建 docker-compose.yml
ersion: '3' 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
docker-compose up -d
location /preview/{
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 本地运行的kkFileView的地址
proxy_pass http://127.0.0.1:8012/;
}
location /preview{
proxy_pass http://192.168.82.9:8012;#文件服务器地址
}
https://你的域名/preview/onlinePreview?url=xxx
http://kkfileview.keking.cn/zh-cn/docs/usage.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。