40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
|
|
# -*- coding: utf-8 -*-
|
||
|
|
SECRET_KEY = "@m7_6qu&0%-t04g75%u!fx)38+p_$js&!1543+6$rckmi@qj^1"
|
||
|
|
# SERVICE_URL = "http://seafile.rozic-dev.com"
|
||
|
|
|
||
|
|
DATABASES = {
|
||
|
|
'default': {
|
||
|
|
'ENGINE': 'django.db.backends.mysql',
|
||
|
|
'NAME': 'seahub_db',
|
||
|
|
'USER': 'seafile',
|
||
|
|
'PASSWORD': '72b88639-3745-4591-9948-ab42b73677ea',
|
||
|
|
'HOST': 'db',
|
||
|
|
'PORT': '3306',
|
||
|
|
'OPTIONS': {'charset': 'utf8mb4'},
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
CACHES = {
|
||
|
|
'default': {
|
||
|
|
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
|
||
|
|
'LOCATION': 'memcached:11211',
|
||
|
|
},
|
||
|
|
'locmem': {
|
||
|
|
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
||
|
|
},
|
||
|
|
}
|
||
|
|
COMPRESS_CACHE_BACKEND = 'locmem'
|
||
|
|
TIME_ZONE = 'Europe/Belgrade'
|
||
|
|
|
||
|
|
# --- Seafile behind Traefik / HTTPS ---
|
||
|
|
|
||
|
|
# Tell Django “requests coming from this HTTPS origin are trusted for CSRF”
|
||
|
|
CSRF_TRUSTED_ORIGINS = ['https://seafile.rozic-dev.com']
|
||
|
|
|
||
|
|
# Public URLs for Seafile
|
||
|
|
SERVICE_URL = 'https://seafile.rozic-dev.com'
|
||
|
|
FILE_SERVER_ROOT = 'https://seafile.rozic-dev.com/seafhttp'
|
||
|
|
|
||
|
|
# Make Django trust X-Forwarded-Proto from Traefik
|
||
|
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|