upgrade seafile to 13

This commit is contained in:
2025-12-07 12:00:45 +01:00
parent b751fa5c5a
commit b07a44543e
8 changed files with 28 additions and 10 deletions

View File

@@ -0,0 +1,16 @@
import os
daemon = True
workers = 5
# default localhost:8000
bind = "127.0.0.1:8000"
# Pid
pids_dir = '/opt/seafile/pids'
pidfile = os.path.join(pids_dir, 'seahub.pid')
# for file upload, we need a longer timeout value (default is only 30s, too short)
timeout = 1200
limit_request_line = 8190

View File

@@ -0,0 +1,4 @@
[WEBDAV]
enabled = false
port = 8080
share_name = /seafdav

View File

@@ -0,0 +1,20 @@
[DATABASE]
type = mysql
host = seafile-mysql
port = 3306
username = seafile
password = PASSWORD
name = seahub_db
[SEAHUB EMAIL]
enabled = false
## interval of sending Seahub email. Can be s(seconds), m(minutes), h(hours), d(days)
interval = 30m
[STATISTICS]
enabled=true
[FILE HISTORY]
enabled = true
suffix = md,txt,doc,docx,xls,xlsx,ppt,pptx,sdoc

View File

@@ -0,0 +1,11 @@
[fileserver]
port = 8082
[database]
type = mysql
host = seafile-mysql
port = 3306
user = seafile
password = PASSWORD
db_name = seafile_db
connection_charset = utf8

View File

@@ -0,0 +1,47 @@
SECRET_KEY = "e$3$hp7u@1ba25kxxa46a7q+bc*3dfulsxhyq+nmap1f@me78$"
DOMAIN = "rik.veenboer.xyz"
SERVICE_URL = f"https://seafile.{DOMAIN}"
CSRF_TRUSTED_ORIGINS = [SERVICE_URL]
# DEBUG = True
TIME_ZONE = "Europe/Amsterdam"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "seahub_db",
"USER": "seafile",
"PASSWORD": "PASSWORD",
"HOST": "seafile-mysql",
"PORT": "3306",
"OPTIONS": {"charset": "utf8mb4"},
}
}
ENABLE_OAUTH = True
# If create new user when he/she logs in Seafile for the first time, defalut `True`.
OAUTH_CREATE_UNKNOWN_USER = True
# If active new user when he/she logs in Seafile for the first time, defalut `True`.
OAUTH_ACTIVATE_USER_AFTER_CREATION = True
# Usually OAuth works through SSL layer. If your server is not parametrized to allow HTTPS, some method will raise an "oauthlib.oauth2.rfc6749.errors.InsecureTransportError". Set this to `True` to avoid this error.
OAUTH_ENABLE_INSECURE_TRANSPORT = False
# Client id/secret generated by authorization server when you register your client application.
OAUTH_CLIENT_ID = "ppPkXbiyxpYKOlHdKHNM69HlzrKBz1DB9eTgvfgh"
OAUTH_CLIENT_SECRET = "G1F5UwQyMDFSZpo8OjMLdU7TbMniWzNDJqjGHsGo1Yr03MOMM5uAw4gHLRMdxM72DLZUWWgSllEOkHk8ifBH7FVhlNw9zwc5LNOFIoXzMNZAuaJhLDlWPjWrfMCiosNT"
# Callback url when user authentication succeeded. Note, the redirect url you input when you register your client application MUST be exactly the same as this value.
OAUTH_REDIRECT_URL = f"{SERVICE_URL}/oauth/callback/"
OAUTH_PROVIDER_DOMAIN = f"authentik.{DOMAIN}"
OAUTH_AUTHORIZATION_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/authorize/"
OAUTH_TOKEN_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/token/"
OAUTH_USER_INFO_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/userinfo/"
OAUTH_SCOPE = ["openid", "profile", "seafile"]
OAUTH_ATTRIBUTE_MAP = {
"seafile_id": (True, "email"),
"seafile_email": (False, "contact_email"),
"name": (False, "name"),
}