Skip to content

Configuration

This article shows an example configuration for docker deployment, but can be easily adapted to all provided platforms.

HTTPS

Run nginx as a frontend container for HTTPS processing and proxy service requests to the backend FACEAPI container. Here you can find the docker-compose.yml file and the Nginx default.conf file for a reference.

Option 2. FaceAPI via HTTPS

To run the FaceAPI service via HTTPS: - add 644 permissions to certificates so the server is able to read certificates - pass cert.crt & cert.key files to the container - pass FACEAPI_CERT_FILE, FACEAPI_KEY_FILE environment variables - forward container port to 8443 host port

chmod 644 ~/cert.crt ~/cert.key
docker run -it -p 8443:41101 -v ~/regula.license:/app/extBin/unix_x64/cpu/regula.license -v ~/cert.crt:/app/cert.crt -v ~/cert.key:/app/cert.key -e FACEAPI_CERT_FILE="/app/cert.crt" -e FACEAPI_KEY_FILE="/app/cert.key" regulaforensics/face-api

Logging

Access logs

The FaceAPI Access logs are a gunicorn server Access log file. To enable FaceAPI Access logs, set the ENV variable FACEAPI_LOGS_ACCESS_FILE to true. You may customize the access log file location via FACEAPI_LOGS_ACCESS_FILE_PATH ENV variable.

To get access to the Access log file from the host machine, it is required to:

  1. Create a folder for logs and ensure the group is root and group members have write & execute permissions over the created folder.
  2. Mount the host folder to the application log folder inside the container:
    mkdir ~/faceapi-logs
    chmod g+wx ~/faceapi-logs
    sudo chgrp root ~/faceapi-logs
    docker run -p host_port:41101 -v host_path_to_license_folder/regula.license:/app/extBin/unix_x64/cpu/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_LOGS_ACCESS_FILE=true regulaforensics/face-api
    

Application logs

The FaceAPI Application logs are a gunicorn server Application log file. To enable the FaceAPI Application logs, set the ENV variable FACEAPI_LOGS_APP_FILE to true. You may customize the access log file location via the FACEAPI_LOGS_APP_FILE_PATH ENV variable.

To get access to the Application log file from the host machine, it is required to:

  1. Create a folder for logs and ensure the group is root and group members have write & execute permissions over the created folder.
  2. Mount the host folder to the application log folder inside the container:
    mkdir ~/faceapi-logs
    chmod g+wx ~/faceapi-logs
    sudo chgrp root ~/faceapi-logs
    docker run -p host_port:41101 -v host_path_to_license_folder/regula.license:/app/extBin/unix_x64/cpu/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_LOGS_APP_FILE=true regulaforensics/face-api
    

Processed results logs

The FaceAPI Processed results logs are the artifacts of the processed request. To enable the FaceAPI application logs, set the ENV variable FACEAPI_PROCESS_RESULTS_LOG_PATH. To get access to the application generated logs from the host machine, it is required to:

  1. Create a folder for logs and ensure the group is root and group members have write & execute permissions over the created folder.
  2. Mount the host folder to the application log folder inside the container:
    mkdir ~/faceapi-logs
    chmod g+wx ~/faceapi-logs
    sudo chgrp root ~/faceapi-logs
    docker run -p host_port:41101 -v host_path_to_license_folder/regula.license:/app/extBin/unix_x64/cpu/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_PROCESS_RESULTS_LOG_PATH=/app/logs regulaforensics/face-api
    
Back to top