You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
1.3 KiB

--- a/seahub/settings.py
+++ b/seahub/settings.py
@@ -140,7 +140,7 @@ TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
- os.path.join(PROJECT_ROOT, '../../seahub-data/custom/templates'),
+ os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data/custom/templates'),
os.path.join(PROJECT_ROOT, 'seahub/templates'),
],
'APP_DIRS': True,
@@ -627,7 +627,7 @@ CAPTCHA_IMAGE_SIZE = (90, 42)
ENABLE_THUMBNAIL = True
# Absolute filesystem path to the directory that will hold thumbnail files.
-SEAHUB_DATA_ROOT = os.path.join(PROJECT_ROOT, '../../seahub-data')
+SEAHUB_DATA_ROOT = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data')
if os.path.exists(SEAHUB_DATA_ROOT):
THUMBNAIL_ROOT = os.path.join(SEAHUB_DATA_ROOT, 'thumbnail')
else:
@@ -790,7 +790,7 @@ except ImportError:
pass
else:
# In server release, sqlite3 db file is <topdir>/seahub.db
- DATABASES['default']['NAME'] = os.path.join(install_topdir, 'seahub.db')
+ DATABASES['default']['NAME'] = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', install_topdir), 'seahub.db')
# In server release, gunicorn is used to deploy seahub
INSTALLED_APPS += ('gunicorn', )