seafileV12+seadoc1.0
seafile V12是正常的,就是搞了几天的sdoc都没有成功,大佬们帮看看怎么回事.
sdoc-server.log报错内容, seadoc-data\nginx-logs 的文件都是0KB
[2024-12-27 10:31:13] [INFO] document-manager.js[104] - 0 docs saved.
[2024-12-27 10:31:28] [INFO] www.js[22] - Starting sdoc server process: 36
[2024-12-27 10:36:24] [ERROR] document-controller.js[56] - Get doc download link error
[2024-12-27 10:36:24] [ERROR] document-controller.js[64] - Get doc download link error. request url is: doc.888.com/api/v2.1/seadoc/download-link/c35e1d65-0566-4331-b24b-55091f76afd8/
[2024-12-27 10:36:28] [INFO] document-manager.js[104] - 0 docs saved.
env配置:
ENABLE_SEADOC=true
SEADOC_IMAGE=docker.seafile.top/seafileltd/sdoc-server:1.0-latest
SEADOC_SERVER_URL=https://doc.888.com/sdoc-server
SEADOC_SERVER_LETSENCRYPT=false
SEADOC_MYSQL_DB_NAME=seahub_db
SEADOC_VOLUME=/D/docker/seafile/seadoc-data
docker yaml配置
seadoc:
image: ${SEADOC_IMAGE:-seafileltd/sdoc-server:1.0-latest}
container_name: sdoc-server
volumes:
- ${SEADOC_VOLUME:-/opt/seadoc-data/shared}:/shared
ports:
- "7071:80"
# - 7070:7070
# - 8888:8888
environment:
- DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
- DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
- DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
- DB_PASSWD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
- DB_NAME=${SEADOC_MYSQL_DB_NAME:-seahub_db}
- TIME_ZONE=${TIME_ZONE:-Etc/UTC}
- NON_ROOT=${NON_ROOT:-false}
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- SEADOC_SERVER_LETSENCRYPT=${SEADOC_SERVER_LETSENCRYPT:-false}
- SEADOC_SERVER_HOSTNAME=${SEADOC_SERVER_URL:-sdoc-server.example.com}
- SEAHUB_SERVICE_URL=${SEAFILE_SERVER_HOSTNAME:-http://seafile.example.com}
labels:
com.centurylinklabs.watchtower.enable: 'true' # keep the up to date
depends_on:
- db
networks:
- seafile-net
seahub_settings.py配置 :SEADOC_SERVER_URL改成http\https都不行
ENABLE_SEADOC = True
SEADOC_PRIVATE_KEY = 'p@p7w*i85f-5v@$!s8)tty-*cu7z5ef7w8cjyp=a=m&$9!h+=9'
SEADOC_SERVER_URL = 'https://doc.888.com/sdoc-server/' # sdoc-server service url http://doc.888.com/sdoc-server
FILE_CONVERTER_SERVER_URL = 'http://sdoc-server:8888'
sdoc_server_config.json 配置
{
“private_key”: “p@p7w*i85f-5v@$!s8)tty-*cu7z5ef7w8cjyp=a=m&$9!h+=9”,
“seahub_service_url”: “doc.888.com”,
“host”: “db”,
“port”: “3306”,
“user”: “seafile”,
“password”: “888”,
“database”: “seahub_db”
}
seafile nginx 配置
location /sdoc-server/ {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
return 204;
}
proxy_pass http://sdoc-server:7070/;
proxy_redirect off;
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;
client_max_body_size 100m;
access_log /var/log/nginx/sdoc-server.access.log;
error_log /var/log/nginx/sdoc-server.error.log;
}
location /socket.io {
proxy_pass http://sdoc-server:7070;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_redirect off;
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
access_log /var/log/nginx/socket-io.access.log;
error_log /var/log/nginx/socket-io.error.log;
}
location /seadoc-converter {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
add_header Access-Control-Allow-Headers "deviceType,token, authorization, content-type";
return 204;
}
proxy_pass http://sdoc-server:8888;
proxy_redirect off;
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;
client_max_body_size 100m;
access_log /var/log/nginx/seadoc-converter.access.log;
error_log /var/log/nginx/seadoc-converter.error.log;
}
参考文档1:SeaDoc Integration - Seafile Admin Manual
参考文档2:seafile-manual-cn