Skip to content

Setup - Infrastructure and Configurations

This section explains the necessary steps for installing the EnQualify back-office applications on Docker and Windows IIS.

ℹ️ The installation of AI and MediaServer components is not included in this document. For the relevant installation steps, see the AI Components document.


Setup With Docker Images

Docker Hub

EnQualify Docker images are hosted on Docker Hub.

  • A user account is required for access to private repositories.
  • Each image is tagged with a version number (tag).
Component Image
EnQualify Web API docker.io/enqurainc/enqualify-api:tag
EnQualify Web UI docker.io/enqurainc/enqualify-ui:tag
EnQualify Mobile API docker.io/enqurainc/enqualify-mapi:tag
EnQualify Mobile API Proxy docker.io/enqurainc/enqualify-mapip:tag
EnQualify Customer API docker.io/enqurainc/enqualify-capi[customer]:tag
EnQualify Signalling docker.io/enqurainc/enqualify-signalling:tag
EnQualify CoTurn docker.io/enqurainc/enqualify-coturn:tag
EnQualify AI App docker.io/enqurainc/enqualify-aiapp:tag
EnQualify Face Recognition docker.io/enqurainc/enqualifyfacerecognition:tag
EnQualify Passive Liveness docker.io/enqurainc/enqualifypassiveliveness:tag
EnQualify Utils docker.io/enqurainc/enqualify-utils:tag

Images

Linux Images

  • Docker images are built on Red Hat Enterprise Linux Universal Base Image 8 (UBI8) + .NET 8 Runtime.
  • The RHEL UBI8 .NET image runs by default with a non-root user having id: 1001.

Reference: Red Hat UBI8 .NET Runtime — Red Hat Catalog

DockerFile

The following DockerFile is used to create the EnQualify Management API Docker image:

dockerfile

Text Only
FROM registry.redhat.io/ubi8/dotnet-80-runtime:latest
ADD Portable .
ADD FFmpeg ./FFmpeg
RUN mkdir ../logs
ADD appsettings.json .
EXPOSE 8080
ENV ASPNETCORE_URLS http://*:8080
CMD ["dotnet", "Enqura.EnVerify.API.Management.dll"]

Common File Paths

Commonly used file paths across all Docker images:

File Path File Path in Image
Application Root /opt/app-root
Application Binaries /opt/app-root/app
Application Settings /opt/app-root/app/appsettings.json
Application DLL /opt/app-root/app/Enqura.EnVerify.[application].dll
Application Logs /opt/app-root/logs
File Share Binding /opt/app-root/files

Templates

Template files are a sample set of files prepared to illustrate the usage of Docker images.

Template content:

  • Docker Compose files
  • Empty appsettings.json files
  • Empty Logs and Files folders
  • PowerShell build and startup scripts

Important notes:

  • Port and required settings are configured via ASPNETCORE_ environment variables and the Kestrel section in appsettings.json. For details: Configure endpoints for ASP.NET Core Kestrel — Microsoft Learn
  • Required configuration changes should be applied to the appsettings.json file.
  • The Docker Compose file binds the Files folder to File Share Binding, the Logs folder to Application Logs, and appsettings.json to Application Settings.

Build Script

The following PowerShell script is used to build and start applications with Docker in a Windows environment:

  • The script prompts for the image tag information before execution.
  • The tag is passed as the TAG build argument to the docker-compose build command and referenced in the DockerFile.
Text Only
Add-Type -assembly "system.io.compression.filesystem"
$scriptpath = $MyInvocation.MyCommand.Definition
$folder = Split-Path $scriptpath
Write-host "EnQualify Template Images"
Write-host "Current Path: '$folder'"
Push-Location $folder
$tag = Read-Host -Prompt 'Base image Tag'
$up = Read-Host -Prompt 'Bring up containers? (Y/N)'
$Env:TAG=$tag
$buildCommand = 'docker-compose build --build-arg TAG=' + $tag
$upCommand = 'docker-compose up'
Write-Host "Building..."
Invoke-Expression -Command $buildCommand
Write-Host "Build completed."
if ($up -eq "Y" -or $up -eq "y"){
    Write-Host "Bringing up..."
    Invoke-Expression -Command $upCommand
}
Read-Host -Prompt 'Script finished.'

Docker Compose File

The following Docker Compose file is used as a template for local image builds.

⚠️ If the CustomerAPI is not provided, the enqualify-capi service should be removed from the Docker Compose file.

Text Only
version: "3.9"
networks:
  localdev:
    name: localdev

services:
  enqualify-api:
    container_name: enqualify-api
    image: enqurainc/enqualify-api:${TAG}
    depends_on:
      - enqualify-capi
    restart: always
    volumes:
      - ./Logs:/opt/app-root/logs
      - ./Files:/opt/app-root/files
      - ./ManagementAPI/appsettings.json:/opt/app-root/app/appsettings.json
    ports:
      - "8081:8080"
    networks:
      - localdev

  enqualify-ui:
    container_name: enqualify-ui
    image: enqurainc/enqualify-ui:${TAG}
    depends_on:
      - enqualify-api
    restart: always
    volumes:
      - ./Logs:/opt/app-root/logs
      - ./ManagementUI/appsettings.json:/opt/app-root/app/appsettings.json
    ports:
      - "8082:8080"
    networks:
      - localdev

  enqualify-mapi:
    container_name: enqualify-mapi
    image: enqurainc/enqualify-mapi:${TAG}
    restart: always
    volumes:
      - ./Logs:/opt/app-root/logs
      - ./MobileAPI/appsettings.json:/opt/app-root/app/appsettings.json
    ports:
      - "8083:8080"
    networks:
      - localdev

  enqualify-mapip:
    container_name: enqualify-mapip
    image: enqurainc/enqualify-mapip:${TAG}
    depends_on:
      - enqualify-mapi
    restart: always
    volumes:
      - ./Logs:/opt/app-root/logs
      - ./MobileAPIProxy/appsettings.json:/opt/app-root/app/appsettings.json
    ports:
      - "8084:8080"
    networks:
      - localdev

  enqualify-capi:
    container_name: enqualify-capi
    image: enqurainc/enqualify-capi:${TAG}
    restart: always
    volumes:
      - ./Logs:/opt/app-root/logs
      - ./CustomerAPI/appsettings.json:/opt/app-root/app/appsettings.json
    ports:
      - "8085:8080"
    networks:
      - localdev

Local Builds

When more control over the Docker image configuration is needed, only base Docker images containing the application binaries are provided. Local Docker images can be created using these base images.


Setup On Windows with IIS

Application Files

Each application is delivered with the following files:

  1. Application binary files
  2. Template appsettings.json file
  3. Template web.config file

Setup IIS

  1. Add IIS Server Role.
  2. Include Windows Authentication.
  3. Install the .NET Hosting Bundle.

Reference: .NET Hosting Bundle — Microsoft Learn


Setup Applications

  1. Create a folder for the application (e.g., C:\inetpub\wwwroot).
  2. Copy the application binary files.
  3. Copy and edit the template appsettings.json file.
  4. Copy and edit the template web.config file.
  5. Create an IIS site for the application. At this step, start the application.
  6. Create a folder for local log files (e.g., C:\Logs). Check access rights to the log folder for the Application Pool Identity or the default IIS user.
  7. Set the site's Preload Enabled value to true.
  8. Set the Application Pool's Start Mode value to AlwaysRunning and Idle Timeout value to 1440.

Web API with Video Features Setup

  1. Prepare a shared files folder. Ensure that full access rights are granted for the Application Pool Identity or the default IIS user.
  2. Configure request size limit settings. (See Web.Config Samples — Request Size Limit Settings)

AD Authentication Setup

  1. Use an AD Service Account as the Application Pool Identity.
  2. Enable Windows Authentication.
  3. Add UI host addresses to the CorsOrigins setting in appsettings.json.
  4. Update the ADAuthServiceBase setting in the Web UI application's appsettings.json file.

Web.Config Samples

Common Settings

Text Only
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*"
             modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet"
                  arguments=".\Enqura.EnVerify.API.Management.dll"
                  stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
                  hostingModel="outofprocess" />
    </system.webServer>
  </location>
</configuration>
Text Only
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <security>
        <requestFiltering removeServerHeader="true" />
      </security>
      <httpProtocol>
        <customHeaders>
          <remove name="X-Powered-By" />
        </customHeaders>
      </httpProtocol>
    </system.webServer>
  </location>
</configuration>

Request Size Limit Settings

Text Only
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <security>
        <requestFiltering>
          <requestLimits maxAllowedContentLength="1000000000" />
        </requestFiltering>
      </security>
      <serverRuntime uploadReadAheadSize="10485760" />
    </system.webServer>
    <system.web>
      <httpRuntime maxRequestLength="1000000000" />
    </system.web>
  </location>
</configuration>

Windows Authentication Settings

Text Only
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <security>
        <authentication>
          <windowsAuthentication enabled="true" />
        </authentication>
      </security>
    </system.webServer>
  </location>
</configuration>