For the complete documentation index, see llms.txt. This page is also available as Markdown.

Service installation and deployment

1. Installation and deployment

The service is containerized 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-backend1n-service:#VERSION#

Where #VERSION# is the specific version number we want to download (for example, 4.2.0).

2. Databases.

Before starting the service, the administrator must create and configure the relevant databases, as well as a specific user for the service. This user/password must be specified in the connection string. The DB technology the service will use will be decided at startup, depending on the prefix of this connection string.

2.1 MongoDB

The environment variable DATABASE_CONNECT_STRING pointing to MongoDB.

# Accepted MongoDB prefixes.
# mongodb://
# mongodb+srv://
export DATABASE_CONNECT_STRING=mongodb://user:pass@localhost:32902/?directConnection=true&serverSelectionTimeoutMS=5000

The service itself will create a database called db-backend, if it does not already exist. It will host two collections:

  • media to store images.

  • patterns to store biometric patterns.

2.2 PostgreSQL

Likewise, the environment variable DATABASE_CONNECT_STRING pointing to PostgreSQL.

The PostgreSQL case differs slightly from MongoDB. A DB named db_backend must have been previously created by the system administrator. PostgreSQL makes it difficult to create databases from the client itself. An example of the prior commands the administrator should run would be:

Inside the PostgreSQL DB, the service will create two tables, just as with MongoDB:

  • media to store images.

  • patterns to store biometric patterns.

3. docker-compose

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

First, you must create a user directory with read and write permissions, for example ~/backend1n/config, and place these two files:

  • The SelphID license file license.lic (required).

  • The service configuration file config.json (optional).

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

In addition, you must provide the environment variable DATABASE_CONNECT_STRING with the connection string to the database (for example, mongodb://127.0.0.1:27017). For debugging purposes, you can disable database operations by providing the value no-db. Example: DATABASE_CONNECT_STRING=no-db

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

4. Additional configuration

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

4.1 License

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

LICENSE_PATH is a folder with the file license.lic and read and write permissions. In this example, ~/backend1n/license/license.lic.

4.2 Service configuration

You can specify another location for the file config.json with the service parameters:

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

If no config.jsonis specified, these default values will be used:

The same JWT parameters can be injected via environment variables using the prefix FACEPHI_BACKEND1N_REST_. For example:

4.3 Debug and usage path

Finally, you can specify a specific volume/path with read and write permissions for the SDK debug information and the SDK usage data, using the environment variables DEBUG_PATH and USAGE_PATH:

4.4 Network configuration

To connect to our license servers, you must add the following rules to your firewall:

IP
Port
Type

52.223.22.71

443

TCP/IP

35.71.188.31

443

TCP/IP

75.2.113.112

443

TCP/IP

99.83.149.57

443

TCP/IP

Next, add the following DNS to your whitelist:

Last updated