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 Workflow 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.
startcontainer.batfile which is located in the root of the repo
git clone https://github.com/optimajet/WorkflowServer ~/optimajet-workflowserver
cd ~/optimajet-workflowserver sudo chmod +x docker-files/wait-for-postgres.sh sudo chmod +x startcontainer.sh sudo ./startcontainer.sh
cd ~/optimajet-workflowserver sudo chmod +x docker-files/wait-for-mongo.sh sudo docker-compose -f docker-files/docker-compose-mongo.yml build sudo docker-compose -f docker-files/docker-compose-mongo.yml run --rm start_db sudo docker-compose -f docker-files/docker-compose-mongo.yml up
cd ~/optimajet-workflowserver sudo chmod +x docker-files/wait-for-mssql.sh sudo docker-compose -f docker-files/docker-compose-mssql.yml build sudo docker-compose -f docker-files/docker-compose-mssql.yml run --rm start_db sudo docker-compose -f docker-files/docker-compose-mssql.yml up