Introduction
This section explains how to deploy a PAS instance using the official PAS docker image, available on Docker Hub as accusoft/prizmdoc-application-services.
PAS requires a connection to PrizmDoc Server. If you haven't done so already, you will need to deploy a PrizmDoc Server instance as well. Please see our PrizmDoc Server Docker installation guide.
NOTE: If you would like to evaluate our product, you can use the PrizmDoc Eval Docker image instead.
Requirements
To run PAS 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 PAS config file
Before you can run PAS, 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 PAS config file:
docker run --rm -e ACCEPT_EULA=YES --volume $pwd/config:/config accusoft/prizmdoc-application-services init-config
This will create a new PAS config file on your Windows host filesystem at .\config\pcc.nix.yml
.
Linux (bash)
Use the Docker image's init-config
command to create a new PAS config file:
docker run --rm -e ACCEPT_EULA=YES --volume $(pwd)/config:/config accusoft/prizmdoc-application-services init-config
This will create a new PAS config file on your host filesystem at ./config/pcc.nix.yml
.
2. Customize your PAS config file
You will need to customize the contents of the pcc.nix.yml
file for your PAS deployment.
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.
Typically, you need to:
-
Configure your connection to PrizmDoc Server by updating the
pccServer
properties:pccServer.hostName: your-prizmdoc-server-host pccServer.port: 18681 pccServer.scheme: http
IMPORTANT: If you run both PAS and Server containers on the same host, keeping the default
pccServer.hostName
value oflocalhost
will not work. You can use the host machine's IP address. Alternatively, you can put both PAS and Server on a dedicated bridge network and reference prizmdoc-server container by its name. -
Configure your storage options.
For more information, see PAS Configuration.
3. Start PAS
Assuming you have configured PAS to run on port 3000
, specified your database connection correctly, and use the ./config
, ./logs
, and ./data
directories, you can start PAS like so:
Windows (PowerShell)
First, create directories for logs and data:
mkdir logs
mkdir data
Then, start a pas
container:
docker run --rm --env ACCEPT_EULA=YES --publish 3000:3000 --volume $pwd/config:/config --volume $pwd/logs:/logs --volume $pwd/data:/data --name pas accusoft/prizmdoc-application-services
Linux (bash)
Start a pas
container like so:
docker run --rm --env ACCEPT_EULA=YES --publish 3000:3000 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name pas accusoft/prizmdoc-application-services
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 3000:3000
publishes the container's port to the host. This assumes PAS was configured to use port 3000. If you have configured PAS to use a different port, adjust accordingly.--volume $(pwd)/config:/config
maps a host config directory into the container. Your local config directory must contain thepcc.nix.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
maps a local data directory into the container. After the container stops, the data will remain in this directory and can be used again when restarting the container.--name pas
sets the name of the running container.accusoft/prizmdoc-application-services
is the image that should be run.
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.
NOTE: As of PrizmDoc v13.19, the Docker container starts a single PAS instance. We recommend that you run multiple containers when you need a PAS cluster. However, you can set the environment variable LEGACY_RUN_MULTIPLE_INSTANCES=YES to run multiple PAS instances in the container. The number of instances depends on the CPU cores count on the host machine.
4. Check PAS health
After starting PAS, GET http://localhost:3000/health
should return HTTP 200, indicating PAS is healthy. If you visit this URL in a browser, you should see "OK" in the body of the page.
Windows (PowerShell)
Invoke-WebRequest -Uri http://localhost:3000/health
Should output something like:
StatusCode : 200
StatusDescription : OK
Content : {79, 75}
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 2
Date: Thu, 21 Nov 2019 17:49:35 GMT
OK
Headers : {[Connection, keep-alive], [Content-Length, 2], [Date, Thu, 21 Nov 2019 17:49:35
GMT]}
RawContentLength : 2
Linux (bash)
curl -i http://localhost:3000/health
Should output something like:
HTTP/1.1 200 OK
Date: Wed, 20 Nov 2019 20:00:39 GMT
Connection: keep-alive
Content-Length: 2
OK
5. Check PAS's connection to PrizmDoc Server
After starting PAS, GET http://localhost:3000/servicesConnection
should return HTTP 200, indicating PAS is configured correctly to make requests to PrizmDoc Server. If you visit this URL in a browser, you should see "OK" in the body of the page.
Windows (PowerShell)
Invoke-WebRequest -Uri http://localhost:3000/servicesConnection
Should output something like:
StatusCode : 200
StatusDescription : OK
Content : {79, 75}
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 2
Date: Thu, 21 Nov 2019 17:50:11 GMT
OK
Headers : {[Connection, keep-alive], [Content-Length, 2], [Date, Thu, 21 Nov 2019 17:50:11
GMT]}
RawContentLength : 2
Linux (bash)
curl -i http://localhost:3000/servicesConnection
Should output something like:
HTTP/1.1 200 OK
Date: Wed, 20 Nov 2019 20:00:39 GMT
Connection: keep-alive
Content-Length: 2
OK
5. Stopping the container
You can stop your named container with:
docker stop pas