InRule Decision Services
InRule Decision Services provide a secure, discoverable set of APIs for executing your decisions and rules. This container exposes both the modern Decision API and the legacy backward-compatible Rule Execution API.
This image can be deployed as a self-hosted Docker container locally or in Azure/AWS cloud platforms. The following instructions detail the steps for installing locally via Docker Desktop.
What You Need
- An InRuleLicense.txt file (provided by InRule Support)
- Primary and secondary API Keys (can be any generated secret or GUID that you wish to use for runtime API authentication)
- Catalog Service URI and credentials
The Catalog Service and Catalog Manager containers should be deployed before Decision Services. This will allow you to obtain the Catalog Service URI and set up a system user in the Catalog Manager to use for Decision Services configuration.
Before starting, make sure you have:
- Docker installed and running
- A reachable InRule Catalog Service endpoint
Required Configuration
The container requires these environment variables:
inrule__licenseinrule__runtime__service__catalog__catalogserviceuriinrule__runtime__service__catalog__userNameinrule__runtime__service__catalog__passwordinrule__runtime__service__apiKey__primaryKeyinrule__runtime__service__apiKey__secondaryKey
Since custom parameters are required, the initial running of the container must be done via Bash or PowerShell.
Optional Configuration
This service supports the following additional settings:
These settings will need to be provided in the cross-platform __ formatted equivalent of the documented settings.
License Requirement
Set the inrule__license environment variable to the contents of your InRuleLicense.txt file (provided by InRule Support).
Logging
The container writes logs to stdout by default, which outputs to the console log stream. No extra Serilog settings are required. When running in AKS or Amazon ECS, stdout can be forwarded using a log collector or a task logging driver.
To add another Serilog sink and keep console output, set Serilog__WriteTo__1__Name (and later indexes). Setting Serilog__WriteTo__0__Name replaces the console sink.
Run the Container
Bash Example
docker run -d \
--name inrule-decision-service \
-p 8080:8080 \
-e inrule__license="your-inrulelicense.txt-contents" \
-e inrule__runtime__service__catalog__catalogserviceuri="https://your-catalog-server/Service.svc/core" \
-e inrule__runtime__service__catalog__userName="your-username" \
-e inrule__runtime__service__catalog__password="your-password" \
-e inrule__runtime__service__apiKey__primaryKey="your-primary-api-key" \
-e inrule__runtime__service__apiKey__secondaryKey="your-secondary-api-key" \
inrule/decision-services:latest
The above multi-line command can also be run using Windows PowerShell ISE by substituting the \ end-of-line delimiter with a backtick. The use of the latest tag in the above example is temporarily unavailable, for now you must specify the specific version tag.
Verify the Container Started
Expected result: HTTP 200 OK
Liveness Check
This endpoint provides a basic process and InRule license check:
http://localhost:8080/api/status/liveness
Example:
curl http://localhost:8080/api/status/liveness
Expected result: HTTP 200 OK
Swagger UI
Use Swagger to confirm the Decision API is reachable:
http://localhost:8080/api/swagger/index.html?inrule-apikey=your-primary-api-key
The legacy RES-compatible Swagger UI is also available at:
http://localhost:8080/res_api/swagger/index.html?inrule-apikey=your-primary-api-key