Introduction
This section explains how to deploy a PrizmDoc Server instance using the official PrizmDoc Server Docker image, available on Docker Hub as accusoft/prizmdoc-server.
NOTE: If you would like to evaluate our product, you can use the PrizmDoc Eval Docker image instead.
Requirements
To run PrizmDoc Server as a Docker container, you simply need a Docker host (a machine with Docker installed). See the Docker documentation for more information.
NOTE: For our recommended hardware requirements, please review the guidance provided in the Server Sizing topic.
1. Create a PrizmDoc Server config file
Before you can run PrizmDoc Server, you'll need a config file. We've included a special init-config
command in our Docker image which you can use to create an initial config file.
Windows (PowerShell)
First, make sure you've created a config
directory on your host file system. This will be the directory where your new config file will be created:
mkdir config
Then, use the Docker image's init-config
command to create a new PrizmDoc Server config file:
docker run --rm -e ACCEPT_EULA=YES --volume $pwd/config:/config accusoft/prizmdoc-server init-config
This will create a new PrizmDoc Server config file on your Windows host filesystem at .\config\prizm-services-config.yml
.
Linux (bash)
Use the init-config
command to create a new PrizmDoc Server config file:
docker run --rm -e ACCEPT_EULA=YES --volume $(pwd)/config:/config accusoft/prizmdoc-server init-config
This will create a new PrizmDoc Server config file on your host filesystem at ./config/prizm-services-config.yml
.
2. Configure your license
To start an instance of PrizmDoc Server, you need a license key from Accusoft. If you don't have a license, please contact info@accusoft.com. If you have questions about licensing options, refer to the Licensing topic.
To configure the license, set the values of license.solutionName
and license.key
in your PrizmDoc Server config file (prizm-services-config.yml
).
NOTE: On a Linux system, because the config file was created by a Docker container, you will need to either edit the config file as root or change the owner of the file before editing it.
For more information about configuring PrizmDoc Server, see Configuring PrizmDoc Server.
3. Start PrizmDoc Server
If you are using the default configuration, you can start PrizmDoc Server as follows:
Windows (PowerShell)
First, create a directory on your host file system to store log files:
mkdir logs
Then, start a prizmdoc-server
container:
docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $pwd/config:/config --volume $pwd/logs:/logs --volume $pwd/data:/data --name prizmdoc-server accusoft/prizmdoc-server
Linux (bash)
Start a prizmdoc-server
container:
docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name prizmdoc-server accusoft/prizmdoc-server
In the examples above:
--rm
ensures the container is automatically deleted when it stops.--env ACCEPT_EULA=YES
indicates you have accepted the PrizmDoc license agreement.--publish 18681:18681
publishes the container'snetwork.publicPort
port to the host. If you enable clustering (network.clustering.enabled: true
), you will also want to publish thenetwork.clustering.clusterPort
(18682
in a default configuration).--volume $(pwd)/config:/config
maps a host config directory into the container. Your local config directory must contain theprizm-services-config.yml
config file created earlier.--volume $(pwd)/logs:/logs
maps a local logs directory into the container. After the container stops, the logs will remain in this directory.--volume $(pwd)/data:/data
(Linux only) maps a local data directory into the container. After the container stops, the data will remain in this directory. Because PrizmDoc Server uses memory-mapped files when writing to the data directory, and because Docker only supports memory-mapped file access to a mapped volume on a Linux host, setting up this particular volume is only supported on a Linux docker host.--name prizmdoc-server
sets the name of the running container.accusoft/prizmdoc-server
is the image that should be run.
Additionally, you can use a TZ
environment variable to control the time zone when rendering documents. For example, add the -e TZ="America/New_York"
option to use the New York time zone in the examples above.
If you want to start the Docker container in the background, add the -d
option to docker run
to run the container in disconnected mode.
IMPORTANT: By default, PrizmDoc may send requests for external content when rendering specific types of documents, such as HTML, email, or Microsoft Office documents. For your production servers, make sure to follow the recommendations in the Security Guidance topic to avoid introducing security risks.
4. Check PrizmDoc Server has finished starting and is healthy
It may take several minutes for PrizmDoc Server to finish starting. But, once fully started, GET /PCCIS/V1/Service/Current/Health
should return HTTP 200, indicating PrizmDoc Server is healthy (while starting, this request will return nothing or an error).
Windows (PowerShell)
Invoke-WebRequest -Uri http://localhost:18681/PCCIS/V1/Service/Current/Health
Should eventually output something like:
StatusCode : 200
StatusDescription : OK
Content : {79, 75}
RawContent : HTTP/1.1 200 OK
X-Server-Chain: 2b95007f011f
X-Server-Response-Time: 0
Connection: keep-alive
Transfer-Encoding: chunked
Date: Thu, 21 Nov 2019 17:01:04 GMT
Headers : {[X-Server-Chain, 2b95007f011f], [X-Server-Response-Time, 0], [Connection, keep-alive], [Transfer-Encoding, chunked]...}
RawContentLength : 2
NOTE: It may take several minutes for PrizmDoc Server to start. You will not get a 200 result until PrizmDoc Server has fully started.
Linux (bash)
curl -i http://localhost:18681/PCCIS/V1/Service/Current/Health
Should eventually output something like:
HTTP/1.1 200 OK
X-Server-Chain: 69a6d22f90b9
X-Server-Response-Time: 1
Date: Wed, 20 Nov 2019 20:25:31 GMT
Connection: keep-alive
Transfer-Encoding: chunked
OK
NOTE: It may take several minutes for PrizmDoc Server to start. You will not get a 200 result until PrizmDoc Server has fully started.
Troubleshooting: Check the admin status page
If you're not getting a 200 response at all, try checking the PrizmDoc Server admin status page in a browser: http://localhost:18681/admin
5. Stopping the container
You can stop your named container with:
docker stop prizmdoc-server
Adding Fonts & Packages to the Container
This section explains how to create your own Docker image from the PrizmDoc Server Docker image to include additional fonts or packages.
1. Create a Dockerfile from the accusoft/prizmdoc-server
image to install Asian languages support and fonts.
FROM accusoft/prizmdoc-server:latest
RUN set -x && \
apt-get update && \
# install Japanese language support
apt-get install -y language-pack-ja && \
# install Chinese language support
apt-get install -y language-pack-zh-hant && \
apt-get install -y language-pack-zh-hans && \
# install Korean language support
apt-get install -y language-pack-ko && \
# install additional fonts
apt-get install -y --no-install-recommends fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-arphic-ukai fonts-arphic-uming fonts-hanazono fonts-ipaexfont fonts-ipafont fonts-nanum fonts-nanum-extra fonts-takao fonts-unfonts-core fonts-unfonts-extra fonts-wqy-zenhei && \
apt-get clean && \
fc-cache -v
Issues with Chinese/Japanese font substitution
In rare occasions, certain fonts with unified characters display Chinese characters when Japanese kanji characters are expected, or vice versa. This can occur if a Docker container has font packages for both Chinese and Japanese languages installed.
For example, when Chinese characters are being rendered but Japanese characters are expected, starting up the Docker container by providing the following environment variables to the docker run
command will set the container's locale to Japan and allow PrizmDoc Server to render the expected characters:
--env LANG=ja_JP.UTF-8 --env LANGUAGE=ja_JP.UTF-8 --env LC_ALL=ja_JP.UTF-8
Additionally, if support for all Asian languages is not required, limiting the installation to only the required languages and font packages can also mitigate issues with font substitution.
2. Build your-company/prizmdoc-server
image using the Dockerfile.
docker build -t your-company/prizmdoc-server:latest .
3. Start PrizmDoc Server from your-company/prizmdoc-server
image.
Windows (PowerShell)
docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $pwd/config:/config --volume $pwd/logs:/logs --name prizmdoc-server your-company/prizmdoc-server
Linux (bash)
docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name prizmdoc-server your-company/prizmdoc-server
For more information about starting and stopping the PrizmDoc Server Docker container, see Install Prizmdoc Server.
PrizmDoc Application Service (PAS) Deployment
If you haven't done so already, you will need to deploy a PrizmDoc Application Service (PAS) instance as well. Please see our PAS Docker installation guide.