vim docker-compose.yml
version: '2'
services:
syncthing:
restart: always
image: joeybaker/syncthing
container_name: syncthing
volumes:
- /data/public/syncthing:/srv/data
- ./config:/srv/config
ports:
- "22000:22000"
- "21027:21027/udp"
network_mode: bridge
environment:
- VIRTUAL_HOST=jia.sync
- VIRTUAL_PORT=8080
docker-compose up -d
配合nginx和dnsmasq
打开jia.sync即可看到syncthing的管理界面
shorewall configure
假如你跟我一样用shorewall配置防火墙的话.请看这里
/etc/shorewall/interfaces, you need the 'upnp' option on your external interface.
#ZONE INTERFACE OPTIONS
net ppp0 dhcp,routefilter,tcpflags,upnpclient