Starting with version 2.3, Workflow Server is published in a container on Docker Hub. All server settings mentioned here can be passed to the server via environment variables. The names of environment variables are set in accordance with the notation adopted in ASP.NET Core for *nix systems with double underscore as a separator of nested properties, for example,
DefaultLoggerConfig__FileSettings__FileName. Since logging levels are defined through an array, each element of the array is set via an environment variable with an index at the end separated by a double underscore, for example,
DefaultLoggerConfig__FileTarget__1, etc. You can read more on this in this document from Microsoft.
As an example, let's take a container configuration from a docker compose file.
workflowserver: depends_on: - db image: optimajet/workflowserver ports: - "8077:8077" volumes: - ./logs:/app/logs - ./license:/app/license environment: ConnectionString: HOST=db;User ID=dbuser;Password=dbuserpassword;Database=wfs;Port=5432 Provider: postgresql CreateMetadata: "true" LicensePath: /app/license/ DefaultLoggerConfig__FileTarget__0: Debug DefaultLoggerConfig__FileTarget__1: Information DefaultLoggerConfig__FileTarget__2: Error DefaultLoggerConfig__FileSettings__FileName: /app/logs/log.txt DefaultLoggerConfig__FileSettings__RollingInterval: Day DefaultLoggerConfig__FileSettings__RetainedFileCountLimit: 30
Here we see the environment variables that will be transmitted to the server as its configuration. Variables with names starting with
DefaultLoggerConfig__ form an object in JSON that will be used as the default logging configuration.
If you are familiar with Docker, you can use the container on its own. But we prepared a container composition (Workflow Server + PostgreSQL) which is deployed with a few commands and is fully configured and operational.
The file for Docker Compose that builds and sets up Workflwow Server and PostgreSQL is available in our repository on github. After running the
compose-start.bat file, the following happens.
You will get a fully functional Workflow Server available at
http://localhost:8077/ after launch.
In order to understand the whole picture you need to understand a few things:
Running Workflow Server through Docker Compose differs depending on the operating system you are using.
compose-start.batfile which is located in the repo under
git clone https://github.com/optimajet/WorkflowServer ~/optimajet-workflowserver
sudo chmod +x compose-start.bat