Skip to content

Conversation

2403905
Copy link
Contributor

@2403905 2403905 commented Sep 1, 2025

Description

feat: added the onlyoffice ee license to the ocis deployment.

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Copy link

update-docs bot commented Sep 1, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@dj4oC
Copy link
Contributor

dj4oC commented Sep 1, 2025

I think we can archive this chmod 644 ./config/onlyoffice/license.lic with adding it to
/ocis-master/deployments/examples/ocis_full/config/onlyoffice/entrypoint-override.sh

@dj4oC
Copy link
Contributor

dj4oC commented Sep 1, 2025

Please add:
onlyoffice:
image: onlyoffice/documentserver-ee:9.0.4
environment:
- JWT_ENABLED=false
- REDIS_SERVER_HOST=localhost
- REDIS_SERVER_PORT=6379

@dj4oC
Copy link
Contributor

dj4oC commented Sep 1, 2025

.env

# --- choose edition ---
# For CE:
# ONLYOFFICE_EDITION_SUFFIX=
# For EE:
ONLYOFFICE_EDITION_SUFFIX=-ee

# Optional: pin a version (recommended)
ONLYOFFICE_TAG=latest

# Runtime env (works for both; EE typically wants these)
ONLYOFFICE_JWT_ENABLED=false
ONLYOFFICE_REDIS_HOST=localhost
ONLYOFFICE_REDIS_PORT=6379

# EE only: path to your license on the host
ONLYOFFICE_LICENSE_LOCAL=./config/onlyoffice/license.lic

docker-compose.yml

services:
  onlyoffice:
    image: onlyoffice/documentserver${ONLYOFFICE_EDITION_SUFFIX}:${ONLYOFFICE_TAG:-latest}
    environment:
      - JWT_ENABLED=${ONLYOFFICE_JWT_ENABLED:-false}
      - REDIS_SERVER_HOST=${ONLYOFFICE_REDIS_HOST:-localhost}
      - REDIS_SERVER_PORT=${ONLYOFFICE_REDIS_PORT:-6379}
    volumes:
      # Mount license; harmless for CE (file can be absent)
      - ${ONLYOFFICE_LICENSE_LOCAL:-/dev/null}:/var/www/onlyoffice/Data/license.lic:ro

@dj4oC
Copy link
Contributor

dj4oC commented Sep 1, 2025

I think we can archive this chmod 644 ./config/onlyoffice/license.lic with adding it to /ocis-master/deployments/examples/ocis_full/config/onlyoffice/entrypoint-override.sh


# Ensure license file has the correct permissions
if [ -f /var/www/onlyoffice/Data/license.lic ]; then
  echo "Fixing permissions on license.lic..."
  chmod 644 /var/www/onlyoffice/Data/license.lic || true
fi
``

@2403905 2403905 changed the title fix: the ocis deployment oo license and external sites feat: added the onlyoffice ee license to the ocis deployment. Sep 2, 2025
Copy link

sonarqubecloud bot commented Sep 2, 2025

@dj4oC dj4oC requested a review from Copilot September 3, 2025 04:29
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for OnlyOffice Enterprise Edition (EE) license configuration to the oCIS deployment. It introduces configurable environment variables to support both Community and Enterprise editions, with specific provisions for mounting EE license files.

Key changes:

  • Added environment variables for OnlyOffice image selection and configuration
  • Implemented license file mounting with proper permissions handling
  • Enhanced container configuration with JWT and Redis settings for EE support

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
deployments/examples/ocis_full/web_extensions/externalsites.yml Added volume mount for apps configuration
deployments/examples/ocis_full/onlyoffice.yml Updated image configuration and added EE license volume mount
deployments/examples/ocis_full/config/onlyoffice/entrypoint-override.sh Added license file permissions handling
deployments/examples/ocis_full/.env Added OnlyOffice configuration environment variables

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

volumes:
# paths are relative to the main compose file
- ./config/onlyoffice/entrypoint-override.sh:/entrypoint-override.sh
- ./config/onlyoffice/local.json:/etc/onlyoffice/documentserver/local.dist.json
# if you want to use oo enterprise edition, you need to add a volume for the license file
# for details see: Registering your Enterprise Edition version -->
# https://helpcenter.onlyoffice.com/installation/docs-enterprise-install-docker.aspx
- ${ONLYOFFICE_LICENSE_LOCAL:-/dev/null}:/var/www/onlyoffice/Data/license.lic:ro
Copy link
Preview

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using /dev/null as a default fallback for the license file mount could cause confusion and potential issues. Consider using a more explicit approach like conditional volume mounting or a placeholder comment explaining this behavior.

Suggested change
- ${ONLYOFFICE_LICENSE_LOCAL:-/dev/null}:/var/www/onlyoffice/Data/license.lic:ro
# Mount the license file only if using enterprise edition. Uncomment and set ONLYOFFICE_LICENSE_LOCAL to the license file path.
# - ${ONLYOFFICE_LICENSE_LOCAL}:/var/www/onlyoffice/Data/license.lic:ro

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works if a docker mounts it as - ${ONLYOFFICE_LICENSE_LOCAL:-/dev/null}:/var/www/onlyoffice/Data/license.lic:ro but in case if the ONLYOFFICE_LICENSE_LOCAL is not set the Oo will not open the document in a trial mode insted Oo said the license is expired
@dj4oC Let's keep it commented out in a onlyoffice.yml

# Ensure license file has the correct permissions
if [ -f /var/www/onlyoffice/Data/license.lic ]; then
echo "Fixing permissions on license.lic..."
chmod 644 /var/www/onlyoffice/Data/license.lic || true
Copy link
Preview

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The || true construct silently ignores chmod failures which could mask legitimate permission issues. Consider logging the error or using a more specific error handling approach.

Suggested change
chmod 644 /var/www/onlyoffice/Data/license.lic || true
if ! chmod 644 /var/www/onlyoffice/Data/license.lic; then
echo "Warning: Failed to set permissions on license.lic" >&2
fi

Copilot uses AI. Check for mistakes.

Copy link
Contributor

@dj4oC dj4oC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but haven't tried it myself

@mmattel
Copy link
Contributor

mmattel commented Sep 3, 2025

This needs a changelog entry.
I can test this earliest mid next week. Greetings from Grado/Italy 🏖️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants