simplify seafile docker compose
This commit is contained in:
79
seafile/server/nginx/conf/seafile.nginx.conf
Normal file
79
seafile/server/nginx/conf/seafile.nginx.conf
Normal file
@@ -0,0 +1,79 @@
|
||||
# -*- mode: nginx -*-
|
||||
# Auto generated at 11/30/2024 22:39:05
|
||||
server {
|
||||
listen 80;
|
||||
server_name seafile.rik.veenboer.xyz;
|
||||
|
||||
client_max_body_size 10m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_read_timeout 310s;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Forwarded "for=$remote_addr;proto=$scheme";
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Connection "";
|
||||
proxy_http_version 1.1;
|
||||
|
||||
client_max_body_size 0;
|
||||
access_log /var/log/nginx/seahub.access.log seafileformat;
|
||||
error_log /var/log/nginx/seahub.error.log;
|
||||
}
|
||||
|
||||
location /seafhttp {
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
client_max_body_size 0;
|
||||
proxy_connect_timeout 36000s;
|
||||
proxy_read_timeout 36000s;
|
||||
proxy_request_buffering off;
|
||||
access_log /var/log/nginx/seafhttp.access.log seafileformat;
|
||||
error_log /var/log/nginx/seafhttp.error.log;
|
||||
}
|
||||
|
||||
location /notification/ping {
|
||||
proxy_pass http://127.0.0.1:8083/ping;
|
||||
access_log /var/log/nginx/notification.access.log seafileformat;
|
||||
error_log /var/log/nginx/notification.error.log;
|
||||
}
|
||||
|
||||
location /notification {
|
||||
proxy_pass http://127.0.0.1:8083/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
access_log /var/log/nginx/notification.access.log seafileformat;
|
||||
error_log /var/log/nginx/notification.error.log;
|
||||
}
|
||||
|
||||
location /seafdav {
|
||||
rewrite ^/seafdav$ /seafdav/ permanent;
|
||||
}
|
||||
|
||||
location /seafdav/ {
|
||||
proxy_pass http://127.0.0.1:8080/seafdav/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 1200s;
|
||||
client_max_body_size 0;
|
||||
|
||||
access_log /var/log/nginx/seafdav.access.log seafileformat;
|
||||
error_log /var/log/nginx/seafdav.error.log;
|
||||
}
|
||||
|
||||
location /:dir_browser {
|
||||
# Logo of WebDAV
|
||||
proxy_pass http://127.0.0.1:8080/:dir_browser;
|
||||
}
|
||||
|
||||
location /media {
|
||||
root /opt/seafile/seafile-server-latest/seahub;
|
||||
}
|
||||
|
||||
}
|
||||
16
seafile/server/seafile/conf/gunicorn.conf.py
Normal file
16
seafile/server/seafile/conf/gunicorn.conf.py
Normal 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
|
||||
4
seafile/server/seafile/conf/seafdav.conf
Normal file
4
seafile/server/seafile/conf/seafdav.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
[WEBDAV]
|
||||
enabled = false
|
||||
port = 8080
|
||||
share_name = /seafdav
|
||||
22
seafile/server/seafile/conf/seafevents.conf
Normal file
22
seafile/server/seafile/conf/seafevents.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
[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
|
||||
|
||||
# Enable statistics
|
||||
[STATISTICS]
|
||||
enabled=false
|
||||
|
||||
# Enable file history
|
||||
[FILE HISTORY]
|
||||
enabled = true
|
||||
suffix = md,txt,doc,docx,xls,xlsx,ppt,pptx,sdoc,py
|
||||
11
seafile/server/seafile/conf/seafile.conf
Normal file
11
seafile/server/seafile/conf/seafile.conf
Normal 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
|
||||
16
seafile/server/seafile/conf/seahub_settings.py
Executable file
16
seafile/server/seafile/conf/seahub_settings.py
Executable file
@@ -0,0 +1,16 @@
|
||||
SECRET_KEY = "e$3$hp7u@1ba25kxxa46a7q+bc*3dfulsxhyq+nmap1f@me78$"
|
||||
SERVICE_URL = "https://seafile.rik.veenboer.xyz"
|
||||
CSRF_TRUSTED_ORIGINS = [SERVICE_URL]
|
||||
DEBUG = False
|
||||
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'},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user