42sol/onlyoffice-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

42sol/onlyoffice-laravel

最新稳定版本:1.0.17

Composer 安装命令:

composer require 42sol/onlyoffice-laravel

包简介

Connector for Laravel for easy Onlyoffcie integration

README 文档

README

Connector between larvel framework and onlyoffcie self-hosted api

Configuration

After installation run

php artisan vendor:publish --tag=onlyoffice-default

Set "host" variable with the address of your only office installation in published configuration file Provide JWT_SECRET generated by your installation of onlyoffice via env variable (assuming one been generated/set during onlyoffice installation).

Development notes

Container configuration

For usage with docker add to your docker-compose file:

    documentserver:
        image: onlyoffice/documentserver
        environment:
            - ALLOW_PRIVATE_IP_ADDRESS=true
            - USE_UNAUTHORIZED_STORAGE=true
            - JWT_ENABLED=false
            - JWT_HEADER=Authorization
            - JWT_SECRET=${JWT_SECRET}

Usage of traefic advised due to complications with traffic routing between containers. Add following to previously mentioned container configuration, update your hosts.etc file with nessesery hosts

        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.$COMPOSE_PROJECT_NAME-office.rule=Host(`*addition to base domain name*.$DOMAIN_NAME`)"
        extra_hosts:
            - "$DOMAIN_NAME=host-gateway"
            - "host.docker.internal=host-gateway"

It is better to set JWT_SECRET via env variable or directly in environment section before running containers. Otherwise it will be generated automatically and will be difficult to obtain.

Also don't forget to add new host (*addition to base domain name*.$DOMAIN_NAME) to extra_hosts section of your php container configuration.

Filesystem configuration

If files you want to open aren't in storage/public forlder then you will have to configure additional symlink and disk in filesystems.php Make shure symlink and 'url' parameter from disk config are leading on the same path.

'files' => [
            'driver' => 'local',
            'root' => storage_path('app/files'),
            'url' => env('APP_URL').'/storage/files',
        ],

 // ...

'links' => [
        //...
        public_path('storage/files') => storage_path('app/files')
    ],        

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-14