groupdocs/comparison-cloud

By groupdocs

Updated 5 months ago

Compare documents for content and style differences across popular platforms

Image
0

269

groupdocs/comparison-cloud repository overview

Document Comparison Cloud REST API

Nuget Nuget GitHub

Product Page | Docs | Demos | Swagger UI | Examples | Blog | Search | Free Support | Free Trial

Flexible document comparison solution for programmers and professionals to compare and merge widely used file formats anywhere. See Product Home for more information.

This Docker image makes it possible to use GroupDocs Comparison Cloud API on a single machine or integrate into your existing application or system solution.

Quick Start

GroupDocs.Comparison Cloud can be started in trial and licensed modes. Optionally you can enable authentication by setting predefined credentials.

Start in Trial mode

To start the container and run GroupDocs.Comparison Cloud in trial mode type the following.

Windows (PowerShell)
docker run `
    -p 8080:80 `
    -v "${pwd}/data:/data" `
    --name comparison_cloud `
    groupdocs/comparison-cloud
Linux (bash)
docker run \
    -p 8080:80 \
    -v $(pwd)/data:/data \
    --name comparison_cloud \
    groupdocs/comparison-cloud

Wait for the startup process to complete you should see the following log:

info: GroupDocs.Comparison.Cloud.Web.Startup[0]
      "License" parameters are omitted, the app works in trial mode.
...

As you can see from the messages above GroupDocs.Comparison Cloud is working in a trial mode so trial limitations are applied:

  • You can compare only two first pages of the document
  • Evaluation watermarks added to the output

Note: You can find more information about licensing and request a temporary license at https://purchase.groupdocs.cloud/trial

Start in Licensed mode

In case you already have the license keys we can run GroupDocs.Comparison Cloud in licensed mode. To do so pass license private and public keys as environment variables as shown below.

Windows (PowerShell)
docker run `
    -p 8080:80 `
    -v "${pwd}/data:/data" `
    -e "LICENSE_PUBLIC_KEY=public_key" `
    -e "LICENSE_PRIVATE_KEY=private_key" `
    --name comparison_cloud `
    groupdocs/comparison-cloud
Linux (bash)
docker run \
    -p 8080:80 \
    -v $(pwd)/data:/data \
    -e LICENSE_PUBLIC_KEY=public_key \
    -e LICENSE_PRIVATE_KEY=private_key \
    --name comparison_cloud \
    groupdocs/comparison-cloud

After the container is started you should see the message that indicates that license has been set successfully:

info: GroupDocs.Comparison.Cloud.Web.Startup[0]
      The license has been set.
...

You can get metered license consumtion by calling API method described here

Enable authentication

To enable authentication set CLIENT_ID/CLIENT_SECRET parameters as it shown below. Note: Authentication is required in case you're going to use SDK.

The TOKEN_SECRET is used as the symmetric key for signing JWT tokens with the HMAC-SHA256 algorithm. • If the TOKEN_SECRET environment variable is set, its value will be used as the signing key. • If the TOKEN_SECRET is not set, the application will generate a random 256-bit secret at runtime. This random secret is not persisted and will change every time the application restarts.

Windows (PowerShell)
docker run `
    -p 8080:80 `
    -v "${pwd}/data:/data" `
    -e "CLIENT_ID=client_id" `
    -e "CLIENT_SECRET=client_secret" `
    -e "TOKEN_SECRET=aifvtf67769fydrdjh089y86f7cfnr6e5ev856db7ii8t787rtb6r689f07t897tk907tn8f6b68d987yh0u" `    
    --name comparison_cloud `
    groupdocs/comparison-cloud
Linux (bash)
docker run \
    -p 8080:80 \
    -v $(pwd)/data:/data \
    -e CLIENT_ID=client_id \
    -e CLIENT_SECRET=client_secret \
    -e TOKEN_SECRET=aifvtf67769fydrdjh089y86f7cfnr6e5ev856db7ii8t787rtb6r689f07t897tk907tn8f6b68d987yh0u \    
    --name comparison_cloud \
    groupdocs/comparison-cloud
Enable Google Cloud Storage

By default, a local storage used inside container for file operations. It's possible to connect a Google Cloud storage by setting GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_STORAGE_BUCKET environment variables.

Windows (PowerShell)
docker run `
    -p 8080:80 `
    -v "${pwd}/data:/data" `
    -e "GOOGLE_APPLICATION_CREDENTIALS=/data/key.json" `
    -e "GOOGLE_STORAGE_BUCKET=bucket_id" `
    --name comparison_cloud `
    groupdocs/comparison-cloud
Linux (bash)
docker run \
    -p 8080:80 \
    -v $(pwd)/data:/data \
    -e GOOGLE_APPLICATION_CREDENTIALS=/data/key.json \
    -e GOOGLE_STORAGE_BUCKET=bucket_id \
    --name comparison_cloud \
    groupdocs/comparison-cloud
Enable AWS S3 Cloud Storage

By default, a local storage used inside container for file operations. It's possible to connect a AWS S3 Cloud storage by setting environment variables:

NameDescription
S3_STORAGE_BUCKETBucket ID
S3_STORAGE_ACCESS_KEYS3 API Access Key
S3_STORAGE_SECRET_KEYS3 API Secret Key
S3_STORAGE_REGIONAWS S3 Region
Windows (PowerShell)
docker run `
    -p 8080:80 `
    -v "${pwd}/data:/data" `
    -e "S3_STORAGE_BUCKET=main_bucket" `
    -e "S3_STORAGE_ACCESS_KEY=XXXXXXXXXXXXXXXXXXX" `
    -e "S3_STORAGE_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" `
    -e "S3_STORAGE_REGION=us-west-2" `
    --name comparison_cloud `
    groupdocs/comparison-cloud
Linux (bash)
docker run \
    -p 8080:80 \
    -v $(pwd)/data:/data \
    -e S3_STORAGE_BUCKET=main_bucket \
    -e S3_STORAGE_ACCESS_KEY=XXXXXXXXXXXXXXXXXXX \
    -e S3_STORAGE_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
    -e S3_STORAGE_REGION=us-west-2" \
    --name comparison_cloud \
    groupdocs/comparison-cloud
Health check

When the container and GroupDocs.Comparison Cloud started you can check service status by calling GET http://localhost:8080/. The successful response status is 200 which means that service is up and running.

Windows (PowerShell)
Invoke-WebRequest -Uri http://localhost:8080/
Linux (bash)
curl -i http://localhost:8080/
Using the UI

After starting, you can use Swagger UI at http://localhost:8080/swagger/ and start exploring the API.

Stopping

To stop the running Docker container, just use Ctrl+C in the same terminal where the container is running. Alternatively, you can stop the container by name.

docker stop comparison_cloud

Container configuration

Volumes
Mount path in containerDescription
/dataFolder with documents to process
Parameters
NameDescription
LICENSE_PUBLIC_KEYPublic key of the license
LICENSE_PRIVATE_KEYPrivate key of the license
CLIENT_IDPredefined client ID (requied when using SDK)
CLIENT_SECRETPredefined client secret key (requied when using SDK)
TOKEN_SECRETThe symmetric key for signing JWT tokens
GOOGLE_APPLICATION_CREDENTIALSPath to json file containing Google Cloud Storage Credentials (can be obtained in Google Cloud Console)
GOOGLE_STORAGE_BUCKETName of Google Cloud Storage bucket, where files should be stored
S3_STORAGE_BUCKETAWS S3 Bucket ID
S3_STORAGE_ACCESS_KEYAWS S3 API Access Key
S3_STORAGE_SECRET_KEYAWS S3 API Secret Key
S3_STORAGE_REGIONAWS S3 Region

Things to Remember

  • If "License" parameters are omitted, the app will work in trial mode.
  • If "CLIENT_ID" parameter is set, each request requires "Authorization" header (JWT Authentication).
  • The URL to obtain token is "/connect/token".
  • SDKs can be used only when Authorization enabled.

Next Steps

We generate our SDKs in different languages so you may check if yours is available in our list. The SDKs are compatible with this image, just use your own base URL and client_id/client_secret, you've configured.

Note: SDKs require authentication, so client_id/client_secret must be set to use them.

Contact Us

Your feedback is very important to us. Please feel free to contact us using our Support Forums.

If you don't find your language in the list, please feel free to request for it on our Support Forums, or use raw REST API requests as you can find it here.

Product Page | Docs | Demos | Swagger UI | Examples | Blog | Search | Free Support | Free Trial

Tag summary

Content type

Image

Digest

sha256:8f5ec3e20

Size

300.6 MB

Last updated

5 months ago

Requires Docker Desktop 4.37.1 or later.