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.
Recommended Hardware 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.
Before running this Docker image, you MUST configure Docker to use the appropriate hardware resources. If you try to run the image with fewer CPUs or less memory, it may not function correctly. For detailed information please review the guidance provided in our Server Sizing guide.
Deploying PrizmDoc Server
1. Get the latest image
Run the following command to pull in the latest PrizmDoc server:
docker pull accusoft/prizmdoc-server
2. Initialize a default config file
Before you can run PrizmDoc Server, you'll need a config file (if you already have a config file defined which you want to use, you can skip to step 4). You can create a default config file using this Docker image's init-config
command. This section explains how to do that.
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 prizm-services-config.yml
file in your config
directory:
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
.
Mac or Linux (bash)
Use the init-config
command to create a new prizm-services-config.yml
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
.
3. Customize your PrizmDoc Server config file
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.
See the product documentation for information about configuring PrizmDoc Server. At a minimum, for a production deployment, you will want to at least configure your license and the central database connection string.
4. Set up Central Database
NOTE: PrizmDoc recommends a database as of v14.4. (PrizmDoc requires a database to run if you are using v14.1-v14.3.)
The database connection string can be specified in the PrizmDoc Server config file. For more information on Central Database configuration see the documentation.
If you do not already have a database for PrizmDoc to connect to, you can use the MySQL Docker image to easily create a database. If both containers are in the same user-defined Docker network, the PrizmDoc container can reference the database container by its name in the connection string.
5. Start PrizmDoc Server
Assuming you are using the default configuration, this section explains how to start a PrizmDoc Server Docker container.
Windows (PowerShell)
First, create a directory on your host file system to store log files:
mkdir logs
Then, start a prizmdoc-server
container like so:
docker run -d --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
Mac (bash)
Start a prizmdoc-server
container like so:
docker run -d --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 like so:
docker run -d --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
Docker Run Options
In the examples above:
-d
runs the container in the background, in detached mode.--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.
6. 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.
Mac or 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
7. 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
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
Build your-company/prizmdoc-server
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
Mac or 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.