[新服务] docker-compose+filebrowser
date
Feb 14, 2023
slug
newservice-docker-filebrowser
status
Published
summary
新服务-
tags
service
type
Post
URL
Summary
- ‣
- old implementation https://1024.ee/2021/05/01/filebrowserdockercf/
步骤
#1
export DOCKER_PROJ=filebrowser
mkdir /data/$DOCKER_PROJ; cd /data/$DOCKER_PROJ
mkdir data config
chown -R www:www data config
# outside symlink to google drive
ln -s /drive/gd_omgd_shared/SSS data/drive-gd_omgd_shared-SSS
cat > docker-compose.yml <<EOF
version: "3"
services:
filebrowser:
image: hurlenko/filebrowser
user: "1000:1000"
#ports:
# - 8188:8080
volumes:
- ./config:/config
- ./data:/data
- ./data/drive-gd_omgd_shared-SSS:/data/drive-gd_omgd_shared-SSS
restart: always
networks:
default:
name: npm_nginx_proxy_manager-network
external: true
EOF
docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f
#2 change npm setting
location / {
# prevents 502 bad gateway error
proxy_buffers 8 32k;
proxy_buffer_size 64k;
client_max_body_size 75M;
# redirect all HTTP traffic to localhost:8088;
proxy_pass http://filebrowser:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header X-NginX-Proxy true;
# enables WS support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 999999999;
}