Skip to content

SelphID Service Installation Manual

1. Introduction

The service is dockerized, and there is a docker image in a Facephi repository.

docker login facephicorp.jfrog.io
user: username
pass: token
docker pull facephicorp.jfrog.io/docker-pro-fphi/facephi-selphid-sdk:#VERSION#

Where #VERSION# is the concrete version number that we want to download (e.g. 6.13.1).

2. docker-compose

One way to deploy the service is to create a docker-compose.yml file with the following content, changing the value of the variables as needed.

version: '3.7'

services:
  selphid-service:
    ports:
      - "8080:8080"
    volumes:
      -  /home/user/selphid/config:/app/selphid-sdk/config
    image: facephicorp.jfrog.io/docker-pro-fphi/facephi-selphid-sdk:#VERSION#
    container_name: facephi-selphid-sdk

First, you must create a user directory, for example /home/user/selphid/config, and place these two files:

  • The license file license.lic (required).
  • The service configuration file config.json (optional).

In the same directory, the service will write the log files.

Run the following command, inside the folder where the docker-compose.yml file is located, to deploy the service:

docker compose up

3. Additional configuration

By following the steps in section 2, the service is ready to start. If you need to create additional volumes for the different asset types, you can follow these additional configurations.

3.1 License

You can mount an additional volume and define the LICENSE_PATH environment variable, in case you want to install the license outside the common configuration directory.

version: '3.7'

services:
  selphid-service:
    ports:
      - "8080:8080"
    volumes:
      -  /home/user/selphi/config:/app/selphid-sdk/config
      -  /home/user/license:/app/selphid-sdk/license
    image: facephicorp.jfrog.io/docker-pro-fphi/facephi-selphid-sdk:#VERSION#
    environment:
      LICENSE_PATH: /app/selphid-sdk/license
    container_name: facephi-selphid-sdk

LICENSE_PATH is a folder with the license.lic. In this example, /home/user/license/license.lic.

3.2 Service

If you need to configure the service, you'll need to provide a config.json file, as described in section 2. If you want to place this file on an additional volume:

version: '3.7'

services:
  selphid-service:
    ports:
      - "8080:8080"
    volumes:
      -  /home/user/selphi/config:/app/selphid-sdk/config
      -  /home/user/service:/app/selphid-sdk/service
    image: facephicorp.jfrog.io/docker-pro-fphi/facephi-selphid-sdk:#VERSION#
    environment:
      CONFIG_FILE: /app/selphid-sdk/service/config.json
    container_name: facephi-selphid-sdk

CONFIG_FILE is the path to the configuration file on the additional volume.

If not specified any config.json, this data will be used by default:

{
    "port": 8080,                   # Service port number.
    "number_of_threads": 0,         # The number of IO threads, 0 = the number of CPU cores.
    "connection_timeout": 0,        # The lifetime of the connection without read or write.
    "keep_alive_request_number": 0, # Set the maximum number of requests that can be served through one keep-alive connection.
                                    # After the maximum number of requests are made, the connection is closed.
                                    # The default value of 0 means no limit.
    "client_max_body_size": 100,    # The maximum size of the body allowed in the requests in Mb.
                                    # The default value of 100 Mb.
    "logger_path" : "./logs",       # Set the path to store log files.
    "logger_level" : "info",        # Possible values are [trace|debug|info|warning|error|critical|off].
    "logger_rotation" : "daily",    # Possible values are [hourly|daily].
    "logger_max_files" : 0          # The default value of 0 means no limit.
}

3.3 Debug and Usage path

Finally, you can specify particular volumen/path for the SDK debug info and SDK usage data, using DEBUG_PATH and USAGE_PATH environment variables:

version: '3.7'

services:
  selphid-service:
    ports:
      - "8080:8080"
    volumes:
      -  /home/user/selphi/config:/app/selphid-sdk/config
      -  /home/user/debug:/app/selphid-sdk/debug
      -  /home/user/usage:/app/selphid-sdk/usage
    image: facephicorp.jfrog.io/docker-pro-fphi/facephi-selphid-sdk:#VERSION#
    environment:
      DEBUG_PATH: /app/selphid-sdk/debug
      USAGE_PATH: /app/selphid-sdk/usage
    container_name: facephi-selphid-sdk