docker 搭建 Seafile 集成 onlyoffice

docker-compose一键部署yaml文件

version: "3"

services:
  db:
    image: mariadb:10.11
    container_name: seafile-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=db_dev  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /share/ZFS18_DATA/Container/app/seafile/seafile-mysql/db:/var/lib/mysql  # Requested, specifies the path to MySQL data persistent store.
    networks:
      - seafile-net

# 添加onlyoffice组件,设置外网端口为10000
  onlyoffice:
    image: onlyoffice/documentserver:latest
    ports:
      - "10000:80"
    container_name: seafile-onlyoffice
    networks:
      - seafile-net
    environment:
      - JWT_ENABLED=true
      - JWT_SECRET=FDVQHs4OXKgU     ##可以自定义


  memcached:
    image: memcached:1.6
    container_name: seafile-memcached
    entrypoint: memcached -m 256
    networks:
      - seafile-net
          
  seafile:
    image: seafileltd/seafile-mc:latest
    container_name: seafile
    ports:
      - "80:80"
#      - "443:443"  # If https is enabled, cancel the comment.
    volumes:
      - /share/ZFS18_DATA/Container/app/seafile/seafile-data:/shared   # Requested, specifies the path to Seafile data persistent store.
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=db_dev  # 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=admin@123.com # Specifies Seafile admin user, default is 'me@example.com'.
      - SEAFILE_ADMIN_PASSWORD=123456     # 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
      - memcached
    networks:
      - seafile-net

networks:
  seafile-net:

修改 seahub_settings.py

seahub_settings.py

# OnlyOffice
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = True
ONLYOFFICE_APIJS_URL = 'http://<your-seafile-doamin>/onlyofficeds/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')
ONLYOFFICE_JWT_SECRET = 'FDVQHs4OXKgU'     ## 和docker-compose.yml 中保持一致

注意: your-seafile-doamin 是指您seafile的服务器的 ip / 域名+端口


发送邮件提醒

邮件提醒会使某些功能有更好的用户体验, 比如发送邮件提醒用户新消息到达. 请在seahub_settings.py中加入以下语句以开启邮件提醒功能
(同时需要对你的邮箱进行设置).

EMAIL_USE_SSL = True
EMAIL_HOST = 'smtp.exmail.qq.com'
EMAIL_HOST_USER = 'username@domain.com'
EMAIL_HOST_PASSWORD = 'Auth_Code'
EMAIL_PORT = '465'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER

相关推荐

  1. docker Seafile 集成 onlyoffice

    2024-02-04 06:16:05       60 阅读
  2. seafile+onlyoffice集成部署

    2024-02-04 06:16:05       56 阅读
  3. docker-集成测试

    2024-02-04 06:16:05       52 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-02-04 06:16:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-02-04 06:16:05       101 阅读
  3. 在Django里面运行非项目文件

    2024-02-04 06:16:05       82 阅读
  4. Python语言-面向对象

    2024-02-04 06:16:05       91 阅读

热门阅读

  1. 如何确定子网地址(范例)?

    2024-02-04 06:16:05       48 阅读
  2. 用linux文件系统的链接功能实现文件缓存LRU

    2024-02-04 06:16:05       54 阅读
  3. kafka排除zookeeper使用kraft的最新部署方案

    2024-02-04 06:16:05       45 阅读
  4. kafka自定义分区策略详解

    2024-02-04 06:16:05       43 阅读
  5. Xlua分析:C#调用Lua

    2024-02-04 06:16:05       40 阅读
  6. 数组和List之间的相互转换

    2024-02-04 06:16:05       49 阅读
  7. 2024.2.3

    2024.2.3

    2024-02-04 06:16:05      44 阅读
  8. 开源模型应用落地-业务优化篇(四)

    2024-02-04 06:16:05       46 阅读