Deploy the TinyMCE Spelling server-side component using Docker (individually licensed)
Deploy the TinyMCE spelling service server-side component using Docker (individually licensed)
The TinyMCE spelling service server-side component can be deployed using Docker or a container orchestration application such as Kubernetes. Tiny provides a pre-configured package for creating a Spelling Service Docker image.
Do not push this docker image to a publicly accessible container registry. Doing so will constitute a breach of the Tiny Self-Hosted Software License Agreement, including: |
Prerequisites
-
The Docker Engine is installed and running.
-
The user has Administrative or Root user access.
-
The user is either:
-
Using a Linux, Unix or macOS operating system.
-
Using Windows and has access to unix command line tools using Git for Windows, Cygwin, or the Windows Subsystem for Linux.
-
Procedure
The following procedure covers downloading, configuring, building and testing the TinyMCE Spelling Service Docker image.
-
Go to Tiny Account > My Downloads and download Tiny Spell Checker Pro.
-
Open a command line and navigate to the directory containing
ephox-spelling_<version>.zip
. Windows Users should open a Bash command line as the Administrator User. -
Extract the contents of
ephox-spelling_<version>.zip
, such as:unzip ephox-spelling_<version>.zip -d tinymce-spelling-service
-
Navigate into the extracted folder.
cd tinymce-spelling-service
-
Extract the contents of
ephox-spelling-docker-starter-kit.zip
, such as:unzip ephox-spelling-docker-starter-kit.zip
The structure of the current directory (
tinymce-spelling-service/
) will be:tinymce-spelling-service/ ├── config │ └── ephox-spelling-docker-env.conf ├── docker-entrypoint.sh ├── Dockerfile ├── ephox-spelling-docker-starter-kit.zip ├── ephox-spelling.war ├── generate-jetty-start.sh ├── license.txt ├── readme.txt └── version.txt
-
Set the permissions on the extracted files to executable.
chmod +x *.sh
-
Optional: Edit the
http
configuration settings inconfig/ephox-spelling-docker-env.conf
. The configurable settings are in thehttp
section of the file. For example:http { max-connections = 100 max-connections-per-host = 10 max-redirects = 10 max-retries = 3 request-timeout-seconds = 10 trust-all-cert = false websphere = { use-ssl-config = true } }
For information on the
http
configuration setting, see: Configure server-side components -http
. -
Optional: Configure the service to use a HTTP proxy by updating
config/ephox-spelling-docker-env.conf
. See: Configure server-side components. -
Optional: Add a custom dictionary, as described in Adding custom dictionaries.
-
Create an
origins.env
file in the same directory as theDockerfile
, and specify the Hypertext Transfer Protocol (HTTP) and domain name of sites hosting the TinyMCE editor (allowed-origins
). Up to 99 origins can be added without editingconfig/ephox-spelling-docker-env.conf
.For example:
ORIGIN0=example.net ORIGIN1=example ORIGIN2=http://example.org
For information on
allowed-origins
, see: Configure server-side components - allowed-origins. -
As the root user or Administrator, build the TinyMCE Spelling Service Docker image using the following command:
docker build -t tinymce-spelling-service .
-
As the root user or Administrator, deploy the service using the following command:
docker run -d -p 8082:8080 --env-file origins.env tinymce-spelling-service
Where:
-
-p 8082:8080
maps the container port8080
to local port8082
. -
--env-file origins.env
adds the allowed origins to the container.
-
-
To verify that the Docker container is deployed and the spelling service is running, execute:
curl http://localhost:8082/ephox-spelling/
The response from the
curl
command should be:Spelling service is running.
The TinyMCE Spelling Service Docker image can now be pushed to a private container registry for deployment on Kubernetes, Docker Swarm or OpenShift.