Collaboration worker
The Collaboration Worker is a separate application intended to relieve Collaboration Server On-Premises of high CPU consumptive tasks. Using this service is optional.
We recommend using this service in large scale deployments to improve reliability. If it is possible, you should run this container on a separate machine.
The Collaboration Worker is available only for the Docker. There is no option to run it with node
.
# Scaling
The only requirement to make the services working together is connecting them to the same Redis and SQL database. You can run multiple worker instances and all of them will be available for Collaboration Server On-Premises instances.
Furthermore, we recommend disabling a built-in Collaboration Worker in Collaboration Server On-Premises if the external is available. You can do it by setting a USE_BUILT_IN_COLLABORATION_WORKER
environment variable to false
.
# Configuration of the Collaboration Worker
The Collaboration Worker and the CKEditor Collaboration Server On-premises should connect to the same databases (SQL and Redis).
The Collaboration storage in both containers should be configured the same way as in the CKEditor Collaboration Server On-premises.
# Docker container environmental variables
REDIS_HOST - required
REDIS_PORT - optional (default: 6379)
REDIS_DB - optional (default: 1)
REDIS_PASSWORD - optional
REDIS_TLS_CA - optional
REDIS_TLS_KEY - optional
REDIS_TLS_CERT - optional
REDIS_TLS_ENABLE - optional (default: false)
REDIS_DISABLE_DNS_LOOKUP - optional (default: false)
REDIS_CLUSTER_NODES - optional
REDIS_IP_FAMILY - optional (required only when using an IPv6 domain as `REDIS_HOST` or `REDIS_CLUSTER_NODES`)
COLLABORATION_STORAGE_DRIVER - optional (default: "database")
COLLABORATION_STORAGE_LOCATION - optional (default: "/var/cs/easyimage", required for file system driver)
COLLABORATION_STORAGE_ACCESS_KEY_ID - optional (required for AWS S3 driver)
COLLABORATION_STORAGE_SECRET_ACCESS_KEY - optional (required for AWS S3 driver)
COLLABORATION_STORAGE_REGION - optional (required for AWS S3 driver)
COLLABORATION_STORAGE_ENDPOINT - optional (required for AWS S3 driver)
COLLABORATION_STORAGE_BUCKET - optional (required for AWS S3 driver)
COLLABORATION_STORAGE_ACCOUNT_NAME - optional (required for Azure Blob Storage driver)
COLLABORATION_STORAGE_ACCOUNT_KEY - optional (required for Azure Blob Storage driver)
COLLABORATION_STORAGE_CONTAINER - optional (required for Azure Blob Storage driver)
DATABASE_DRIVER - optional (default: "mysql")
DATABASE_HOST - required
DATABASE_PORT - optional (default: 3306)
DATABASE_USER - optional (default: "root"), but it is highly recommeneded you change it
DATABASE_PASSWORD - optional (default: "password"), but it is highly recommeneded you change it
DATABASE_DATABASE - optional (default: "cs-on-premises")
DATABASE_SCHEMA - optional (default: "cs-on-premises", used for Postgres driver)
DATABASE_SSL_ENABLE - optional
DATABASE_SSL_CA - optional
DATABASE_SSL_KEY - optional
DATABASE_SSL_CERT - optional
# Example with docker-compose
The steps are similar as in the case of regular Collaboration Server On-Premises installation.
We use docker-compose
as an example configuration to explain how the services should be configured. In a production environment, we recommend using clusters managed by a container-orchestration system like Docker Swarm, Kubernetes, ECS, GKE, AKS, or OpenShift.
- If you have the
docker-compose.yml
file already, you can only addworker-cs
service and setUSE_BUILT_IN_COLLABORATION_WORKER
environment variable tofalse
inckeditor-cs
. Otherwise, create the file with content:
version: "3.7"
services:
mysql-database:
image: mysql:5.7.38
platform: linux/amd64
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
redis:
image: redis:6.2.7
ckeditor-cs:
image: docker.cke-cs.com/cs:[version]
depends_on:
- redis
- mysql-database
ports:
- "8000:8000"
restart: always
init: true
environment:
DATABASE_DRIVER: mysql
DATABASE_HOST: mysql-database
DATABASE_USER: root
DATABASE_PASSWORD: password
REDIS_HOST: redis
ENVIRONMENTS_MANAGEMENT_SECRET_KEY: secret
LICENSE_KEY: your_license_key
STORAGE_DRIVER: filesystem
STORAGE_LOCATION: /var/cs/easyimage
USE_BUILT_IN_COLLABORATION_WORKER: "false"
volumes:
- ~/easyimage_files:/var/cs/easyimage
worker-cs:
image: docker.cke-cs.com/cs-worker:[version]
restart: always
init: true
environment:
DATABASE_DRIVER: mysql
DATABASE_HOST: mysql-database
DATABASE_USER: root
DATABASE_PASSWORD: password
REDIS_HOST: redis
The version of cs
and cs-worker
images should be the same.
You should also connect the services to the same Redis and SQL databases.
-
Create the
init.sql
file:CREATE DATABASE `cs-on-premises` DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
-
Run:
docker-compose up