Merge pull request #138 from haiwen/6.3.4-t

add the conf of memcached in seahub_settings.py
This commit is contained in:
Hulk 2019-01-24 11:04:34 +08:00 committed by GitHub
commit 0c303e7ee2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 3 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
version=6.3.11
version=6.3.4
set -e -x
./ci/install_deps.sh

View file

@ -1,4 +1,4 @@
server_version=6.3.11
server_version=6.3.4
base_image=seafileltd/base:18.04
base_image_squashed=seafileltd/base:18.04-squashed

View file

@ -3,7 +3,7 @@ WORKDIR /opt/seafile
RUN mkdir -p /etc/my_init.d
ENV SEAFILE_VERSION=6.3.3 SEAFILE_SERVER=seafile-server
ENV SEAFILE_VERSION=6.3.4 SEAFILE_SERVER=seafile-server
RUN mkdir -p /opt/seafile/ && \
curl -sSL -o - https://download.seadrive.org/seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz \

View file

@ -128,6 +128,17 @@ def init_seafile_server():
domain = get_conf('SEAFILE_SERVER_HOSTNAME', 'seafile.example.com')
proto = 'https' if is_https() else 'http'
with open(join(topdir, 'conf', 'seahub_settings.py'), 'a+') as fp:
fp.write('\n')
fp.write("""CACHES = {
'default': {
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
'LOCATION': '127.0.0.1:11211',
},
'locmem': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
},
}
COMPRESS_CACHE_BACKEND = 'locmem'""")
fp.write('\n')
fp.write('FILE_SERVER_ROOT = "{proto}://{domain}/seafhttp"'.format(proto=proto, domain=domain))
fp.write('\n')