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
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.jsonfiles - Empty
LogsandFilesfolders - PowerShell build and startup scripts
Important notes:
- Port and required settings are configured via
ASPNETCORE_environment variables and theKestrelsection inappsettings.json. For details: Configure endpoints for ASP.NET Core Kestrel — Microsoft Learn - Required configuration changes should be applied to the
appsettings.jsonfile. - The Docker Compose file binds the
Filesfolder to File Share Binding, theLogsfolder to Application Logs, andappsettings.jsonto 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
TAGbuild argument to thedocker-compose buildcommand and referenced in the DockerFile.
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-capiservice should be removed from the Docker Compose file.
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:
- Application binary files
- Template
appsettings.jsonfile - Template
web.configfile
Setup IIS¶
- Add IIS Server Role.
- Include Windows Authentication.
- Install the .NET Hosting Bundle.
Reference: .NET Hosting Bundle — Microsoft Learn
Setup Applications¶
- Create a folder for the application (e.g.,
C:\inetpub\wwwroot). - Copy the application binary files.
- Copy and edit the template
appsettings.jsonfile. - Copy and edit the template
web.configfile. - Create an IIS site for the application. At this step, start the application.
- 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. - Set the site's Preload Enabled value to
true. - Set the Application Pool's Start Mode value to
AlwaysRunningand Idle Timeout value to1440.
Web API with Video Features Setup¶
- Prepare a shared files folder. Ensure that full access rights are granted for the Application Pool Identity or the default IIS user.
- Configure request size limit settings. (See Web.Config Samples — Request Size Limit Settings)
AD Authentication Setup¶
- Use an AD Service Account as the Application Pool Identity.
- Enable Windows Authentication.
- Add UI host addresses to the
CorsOriginssetting inappsettings.json. - Update the
ADAuthServiceBasesetting in the Web UI application'sappsettings.jsonfile.
Web.Config Samples¶
Common Settings¶
<?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>
Security Related Settings¶
<?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¶
<?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>