deactivate socat, link runtime folder to shared volume

not working, media link creation deactivated
This commit is contained in:
Gerrit Gogel 2021-01-27 02:36:40 +01:00
parent de428fae71
commit 2931f8b8ff
6 changed files with 15 additions and 6 deletions

View file

@ -45,8 +45,8 @@ def init_seafile_server():
# sysbol link unlink after docker finish.
latest_version_dir='/opt/seafile/seafile-server-latest'
current_version_dir='/opt/seafile/' + get_conf('SEAFILE_SERVER', 'seafile-server') + '-' + read_version_stamp()
if not exists(latest_version_dir):
call('ln -sf ' + current_version_dir + ' ' + latest_version_dir)
#if not exists(latest_version_dir):
#call('ln -sf ' + current_version_dir + ' ' + latest_version_dir)
loginfo('Skip running setup-seafile-mysql.py because there is existing seafile-data folder.')
return

View file

@ -43,3 +43,8 @@ fi
if [[ -e /shared/logs/var-log ]]; then
rm -rf /shared/logs/var-log
fi
mkdir -p /shared/runtime
ln -sf /opt/seafile/seafile-server-8.0.2 /opt/seafile/seafile-server-latest
rm -rf /opt/seafile/seafile-server-latest/runtime
ln -sf /shared/runtime /opt/seafile/seafile-server-latest/runtime

View file

@ -21,7 +21,7 @@ function start_socat {
echo "Waiting for SeaRPC socket..."
sleep 1
done
socat -d -d TCP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever
#socat -d -d TCP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever
}
function stop_socat {

View file

@ -166,7 +166,7 @@ def check_upgrade():
current_version = os.environ['SEAFILE_VERSION']
if last_version == current_version:
fix_media_symlinks(current_version)
#fix_media_symlinks(current_version)
return
elif is_minor_upgrade(last_version, current_version):
run_minor_upgrade(current_version)

View file

@ -39,4 +39,8 @@ if [[ ! -e /shared/seafile/conf/seahub.conf ]]; then
fi
rm -f /opt/seafile/seafile-server-latest/runtime/seahub.conf
ln -sf /shared/seafile/conf/seahub.conf /opt/seafile/seafile-server-latest/runtime/seahub.conf
ln -sf /shared/seafile/conf/seahub.conf /opt/seafile/seafile-server-latest/runtime/seahub.conf
mkdir -p /shared/runtime
rm -rf /opt/seafile/seafile-server-latest/runtime
ln -sf /shared/runtime /opt/seafile/seafile-server-latest/runtime

View file

@ -3,7 +3,7 @@
/scripts/create_data_links.sh
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 TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2 &
python3 /opt/seafile/seafile-server-latest/seahub/manage.py runserver 0.0.0.0:8000