Skip to content
Jason Harrop edited this page Jun 30, 2019 · 2 revisions

Setting up the viewer/editor locally or on premise is quite simple using docker on Linux

Prerequisites

Docker is installed and running in your environment.

Step 1: docker-compose.yaml

Please download the docker-compose.yaml template from http://downloads.nativedocuments.com/docker/NativeDocumentsServices.zip and unpack it.

Step 2: get a license key

You'll need some credentials. To get these, please register and log in at https://developers.nativedocuments.com/

After registering/logging in, in the middle of the page you will see: Request a 3 month eval license for the Word File Editor docker containers.

Click the "request" link, and you will get a matching pair + license URL.

Step 3: customise .env

You need to customize the ".env" file:

ND_WEBAPP_PORT=8080
ND_DOCKER_REGISTRY=
ND_BUILD_TS=latest
ND_DEPLOY_TAG=DEV
ND_LICENSE_URL=data:application/x-x509-ca-cert;base64,...

Substitute your ND_LICENSE_URL value into the file.

Step 3: docker-compose up

Start the service with:

docker-compose up -d

Quickly confirm the service is working:

curl -f -L ${ND_SERVICE_URL} && echo "SERVICE IS WORKING"

where ${ND_SERVICE_URL} is http://your.ip:${ND_WEBAPP_PORT} (the port you used in your .env file)

Step 4: upload and open a document

Start the local proxy as shown in the README.

You need to specify your ${ND_SERVICE_URL}.

You can do this on the command line:

npm start -nd-dev-id="${ND_DEV_ID}" -nd-dev-secret="${ND_DEV_SECRET}" -nd-service-url="${ND_SERVICE_URL}"

or in a config file in your .ndapi dir in your home directory:

{
  "service_url": "${ND_SERVICE_URL}",
  "dev_id": "YOUR DEV ID GOES HERE",
  "dev_secret": "YOUR DEV SECRET GOES HERE"
  "api_ver": "DEV"
}

where ${ND_SERVICE_URL} is http://your.ip:${ND_WEBAPP_PORT} (the port you used in your .env file)

Now that the proxy is running, you can upoad a document and open it in your web browser as shown at README.

Step 3: docker-compose down

You can stop the service with:

docker-compose down

If you want to stop it, and delete your data (the nddata volume):

docker-compose down -v

If you want to stop it, and delete your data (the nddata volume), and clean up:

docker-compose down -v --rmi all