use udp instead of tcp for socat

This commit is contained in:
Gerrit Gogel 2021-01-28 19:42:17 +01:00
parent 557d126707
commit 7d44ab689e
3 changed files with 3 additions and 3 deletions

View file

@ -38,6 +38,6 @@ ln -sf /dev/stdout /opt/seafile/logs/seafile.log &&\
ln -sf /dev/stdout /opt/seafile/logs/controller.log &&\ ln -sf /dev/stdout /opt/seafile/logs/controller.log &&\
ln -sf /dev/stdout /opt/seafile/logs/ccnet.log ln -sf /dev/stdout /opt/seafile/logs/ccnet.log
EXPOSE 8080 8082 8001 EXPOSE 8080 8082 8001/UDP
CMD ["/scripts/start.sh"] CMD ["/scripts/start.sh"]

View file

@ -21,7 +21,7 @@ function start_socat {
while [ ! -S /opt/seafile/seafile-server-latest/runtime/seafile.sock ]; do while [ ! -S /opt/seafile/seafile-server-latest/runtime/seafile.sock ]; do
sleep 1 sleep 1
done done
socat -d -d TCP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever socat -d -d UDP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever
} }
function stop_socat { function stop_socat {

View file

@ -10,7 +10,7 @@ function start_seahub {
function start_socat { function start_socat {
mkdir -p /opt/seafile/seafile-server-latest/runtime mkdir -p /opt/seafile/seafile-server-latest/runtime
socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2 socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork UDP:seafile-server:8001
} }
function keep_running { function keep_running {