本文主要是介绍seafile+onlyoffice集成部署,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
准备docker-compose
version: "3"
services:db:image: mariadb:10.11container_name: seafile-mysqlrestart: alwaysenvironment:- MYSQL_ROOT_PASSWORD=sea123456 # Requested, set the root's password of MySQL service.- MYSQL_LOG_CONSOLE=truevolumes:- ./data/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.memcached:image: memcached:1.6container_name: seafile-memcachedrestart: alwaysentrypoint: memcached -m 256seafile:image: seafileltd/seafile-mc:11.0.3container_name: seafilerestart: alwaysports:- "2401:80"
# - "443:443" # If https is enabled, cancel the comment.volumes:- ./data/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.environment:- DB_HOST=db- DB_ROOT_PASSWD=sea123456 # Requested, the value shuold be root's password of MySQL service.
# - TIME_ZONE=Asia/Shanghai # 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 use letsencrypt to generate cert.- SEAFILE_SERVER_HOSTNAME=seafile.example.com # Specifies your host name.depends_on:- db- memcachedsea-onlyoffice:image: onlyoffice/documentserver:7.5.1container_name: sea-onlyofficerestart: alwaysenvironment:- JWT_ENABLED=false#- USE_UNAUTHORIZED_STORAGE=true#- ONLYOFFICE_HTTPS_HSTS_ENABLED=falseports:- "24011:80"# - "8443:443"volumes:- ./data/seafile-onlyoffice/log:/var/log/onlyoffice- ./data/seafile-onlyoffice/data:/var/www/onlyoffice/Data- ./data/seafile-onlyoffice/lib:/var/lib/onlyoffice- ./data/seafile-onlyoffice/postgresql:/var/lib/postgresql# - ./default.json:/etc/onlyoffice/documentserver/default.jsonnetworks:default:external:name: test
修改default.json
docker cp sea-onlyoffice:/etc/onlyoffice/documentserver/default.json ./
修改以下值为:
...
"request-filtering-agent" : {"allowPrivateIPAddress": true,"allowMetaIPAddress": true},
...
在docker-compose中添加挂载:
- ./default.json:/etc/onlyoffice/documentserver/default.json
编辑seahub_settings.py
编辑./data/seafile-data/seafile/conf/seahub_settings.py,替换IP:PORT,添加:
# Enable Only Office
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
# ONLYOFFICE_APIJS_URL = 'http{s}://{your OnlyOffice server's domain or IP}/web-apps/apps/api/documents/api.js'
ONLYOFFICE_APIJS_URL = 'http://IP:PORT/web-apps/apps/api/documents/api.js'
ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')
ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx')
这篇关于seafile+onlyoffice集成部署的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!