Set proper FILE_SERVER_ROOT in bootstrapping.

This commit is contained in:
Shuai Lin 2016-11-25 16:10:29 +08:00
parent e385675733
commit f826ea3d0f
2 changed files with 12 additions and 1 deletions

View file

@ -234,7 +234,11 @@ logs() {
}
destroy() {
err_and_quit "Not implemented yet"
(
set -x
docker stop -t 10 seafile || true
docker rm seafile
)
}
rebuild() {

View file

@ -139,6 +139,13 @@ def init_seafile_server():
setup_script = get_script('setup-seafile-mysql.sh')
call('{} auto -n seafile'.format(setup_script), env=env)
domain = get_conf('server.hostname')
proto = 'https' if is_https() else 'http'
with open(join(topdir, 'conf', 'seahub_settings.py'), 'a+') as fp:
fp.write('\n')
fp.write('FILE_SERVER_ROOT = "{proto}://{domain}/seafhttp"'.format(proto=proto, domain=domain))
fp.write('\n')
files_to_copy = ['conf', 'ccnet', 'seafile-data', 'seahub-data',]
for fn in files_to_copy:
src = join(topdir, fn)