docker部署yml文件
version: "2.4"
services:
snapdrop:
image: seji/snapdrop-docker:latest
container_name: snapdrop
environment:
- PUID=1026
- PGID=101
- TZ=Asia/Shanghai
volumes:
- /home/docker/app/app_data/snapdrop:/etc/nginx/conf.d
network_mode: host
restart: always
/home/docker/app/app_data/snapdrop/defaut.conf
server {
listen 10021;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /server {
proxy_connect_timeout 300;
proxy_pass http://127.0.0.1:3000;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
# proxy_set_header X-Forwarded-for $remote_addr;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
注释proxy_set_header X-Forwarded-for $remote_addr;
则局域网可用
不挂载/etc/nginx/conf.d
则默认使用80端口