-
Notifications
You must be signed in to change notification settings - Fork 49
Deployment
The CQF Ruler is packaged with an embedded Jetty server, which can be easily started using the Maven Jetty plugin. The simplest example of spinning up the Jetty server can be done with the following command:
-
mvn jetty:run -am --projects cqf-ruler-dstu3
- Starts embedded Jetty server accessible at base URL
http://localhost:8080/cqf-ruler-dstu3/fhir
- Starts embedded Jetty server accessible at base URL
For R4 use mvn jetty:run -am --projects cqf-ruler-r4
After running that command the CQF Ruler will be available at the default endpoint: http://localhost:8080/cqf-ruler-dstu3/fhir
or http://locahost:8080/cqf-ruler-r4/fhir
. You can change the port with the jetty.http.port
property:
mvn -Djetty.http.port=8081 jetty:run -am --projects cqf-ruler-r4
It is possible to customize the endpoint using the protocolAndHost
maven property:
mvn -DprotocolAndHost=http://measure.eval.kanvix.com jetty:run -am --projects cqf-ruler-r4
Build the CQF Ruler:
mvn -DskipTests package
Following the execution of that command, a war file (cqf-ruler.war) will be available within the target directory at the project root. Drop that war file into and start your Tomcat instance. The CQF Ruler will be available at the default endpoint: http://localhost:8080/cqf-ruler
.
Customizing the endpoint requires an additional configuration step to set the required system properties. The configuration step requires creating a setenv.sh (setenv.bat for Windows) file in the {TOMCAT_HOME}/bin directory with the system properties defined. The following is an example for Mac/Linux:
CATALINA_OPTS="${CATALINA_OPTS} -DprotocolAndHost=http://localhost:8080 -Ddstu3Path=cqf-ruler/baseDstu3 -Ddstu2Path=cqf-ruler/baseDstu2 -Dr4Path=cqf-ruler/baseR4 -Ddev=true -Dfhir.baseurl.r4=http://localhost:8080/cqf-ruler/baseR4 -Dfhir.baseurl.dstu3=http://localhost:8080/cqf-ruler/baseDstu3 -Dfhir.baseurl.dstu2=http://localhost:8080/cqf-ruler/baseDstu2"
For Windows:
JAVA_OPTS=-DprotocolAndHost=http://localhost:8080 -Ddstu3Path=cqf-ruler/baseDstu3 -Ddstu2Path=cqf-ruler/baseDstu2 -Dr4Path=cqf-ruler/baseR4 -Ddev=true -Dfhir.baseurl.r4=http://localhost:8080/cqf-ruler/baseR4 -Dfhir.baseurl.dstu3=http://localhost:8080/cqf-ruler/baseDstu3 -Dfhir.baseurl.dstu2=http://localhost:8080/cqf-ruler/baseDstu2
The CQF Ruler is also available in the form of a Linux Docker container that contains an instance of the CQF Ruler running in a Jetty server. This is a publicly available container - contentgroup/cqf-ruler.
With a Docker instance installed that supports Linux containers (see the Docker documentation here for installation instructions), you can get and install the container by issuing the following Docker commands at the command line:
docker pull contentgroup/cqf-ruler docker run -p 8080:8080 contentgroup/cqf-ruler
This should pull the latest version of the container - contentgroup/cqf-ruler - and start the instance with the CQF Ruler being exposed on port 8080.
*If these deployment options are not satisfactory for your system, please raise an issue in this repository and we will make every effort to come up with a solution. Additionally, contributions are always welcomed and encouraged.