official seafile container

This commit is contained in:
2024-11-30 21:00:23 +01:00
parent ded85734cd
commit 4c5809c473
6 changed files with 90 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ services:
- /opt/seafile:/seafile
- /media/sync/seafile:/seafile/seafile-data
seafile-db:
seafile-mysql:
image: mariadb:10.11
container_name: seafile-mysql
environment:
@@ -24,7 +24,8 @@ services:
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- /opt/seafile-mysql/db:/var/lib/mysql # Required, specifies the path to MySQL data persistent store.
- /opt/seafile-new/db:/var/lib/mysql
- /opt/seafile-new/tmp:/host
env_file:
- /opt/seafile-new/.env
@@ -39,18 +40,16 @@ services:
ports:
- "12380:80"
volumes:
- /opt/seafile-new/tmp:/host
- /opt/seafile-new/tmp/setup-seafile-mysql.py:/scripts/setup-seafile-mysql.py
- /opt/seafile-new/server:/shared
- /media/sync/seafile:/shared/seafile/seafile-data
environment:
- DB_HOST=seafile-db
- DB_HOST=seafile-mysql
- DB_ROOT_PASSWD=${SEAFILE_MYSQL_DB_PASSWORD}
#- TIME_ZONE=Europe/Amsterdam # Optional, default is UTC. Should be uncomment and set to your local time zone.
#- SEAFILE_ADMIN_EMAIL=me@example.com # Specifies Seafile admin user, default is 'me@example.com'.
#- SEAFILE_ADMIN_PASSWORD=asecret # Specifies Seafile admin password, default is 'asecret'.
#- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
#- SEAFILE_SERVER_HOSTNAME=docs.seafile.com # Specifies your host name if https is enabled.
- TIME_ZONE=Europe/Amsterdam
depends_on:
- seafile-db
- seafile-mysql
- seafile-memcached
env_file:
- /opt/seafile-new/.env

View File

@@ -0,0 +1,11 @@
[General]
[Database]
ENGINE = mysql
HOST = seafile-mysql
PORT = 3306
USER = seafile
PASSWD = 26669b06-5358-4693-95f3-833da89c70cb
DB = ccnet_db
CONNECTION_CHARSET = utf8

View File

@@ -0,0 +1,17 @@
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,5 @@
[WEBDAV]
enabled = false
port = 8080
share_name = /seafdav

View File

@@ -0,0 +1,19 @@
[fileserver]
port = 8082
[database]
type = mysql
host = seafile-mysql
port = 3306
user = seafile
password = 26669b06-5358-4693-95f3-833da89c70cb
db_name = seafile_db
connection_charset = utf8
[notification]
enabled = false
host = 127.0.0.1
port = 8083
log_level = info
jwt_private_key = -fl9r-9imc*dhtpgx4w9**bdk*8thq!wq6_0_mov*z!3chs(bu

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
SECRET_KEY = "b'x)npwu6*%19$_*-c+%yl(tudan3)uc9f#*hur3$18yw*6z33+&'"
SERVICE_URL = "http://seafile.example.com/"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'seahub_db',
'USER': 'seafile',
'PASSWORD': '26669b06-5358-4693-95f3-833da89c70cb',
'HOST': 'seafile-mysql',
'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/Amsterdam'
FILE_SERVER_ROOT = "http://seafile.example.com/seafhttp"