mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
modify seafdav config
This commit is contained in:
parent
b2fa1ee7a1
commit
873656cd59
|
@ -69,7 +69,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /seafdav {
|
location /seafdav {
|
||||||
proxy_pass http://127.0.0.1:8080/seafdav;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
|
@ -69,7 +69,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /seafdav {
|
location /seafdav {
|
||||||
proxy_pass http://127.0.0.1:8080/seafdav;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
|
@ -206,6 +206,18 @@ COMPRESS_CACHE_BACKEND = 'locmem'""")
|
||||||
with open(join(topdir, 'conf', 'seahub_settings.py'), 'w') as fp:
|
with open(join(topdir, 'conf', 'seahub_settings.py'), 'w') as fp:
|
||||||
fp.writelines(fp_lines)
|
fp.writelines(fp_lines)
|
||||||
|
|
||||||
|
# Modify seafdav config
|
||||||
|
if os.path.exists(join(topdir, 'conf', 'seafdav.conf')):
|
||||||
|
with open(join(topdir, 'conf', 'seafdav.conf'), 'r') as fp:
|
||||||
|
fp_lines = fp.readlines()
|
||||||
|
if 'share_name = /\n' in fp_lines:
|
||||||
|
replace_index = fp_lines.index('share_name = /\n')
|
||||||
|
replace_line = 'share_name = /seafdav\n'
|
||||||
|
fp_lines[replace_index] = replace_line
|
||||||
|
|
||||||
|
with open(join(topdir, 'conf', 'seafdav.conf'), 'w') as fp:
|
||||||
|
fp.writelines(fp_lines)
|
||||||
|
|
||||||
# After the setup script creates all the files inside the
|
# After the setup script creates all the files inside the
|
||||||
# container, we need to move them to the shared volume
|
# container, we need to move them to the shared volume
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue