Backend1N Service Installation Manual
1. Installation and deployment
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-core-pro-fphi/facephi-backend1n-service:#VERSION#
Where #VERSION# is the concrete version number that we want to download (e.g. 4.2.0).
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:
backend1n-service:
ports:
- "6982:6982"
volumes:
- ~/backend1n/config:/service/config
environment:
DATABASE_CONNECT_STRING: mongodb://127.0.0.1:27017
image: facephicorp.jfrog.io/docker-core-pro-fphi/facephi-backend1n-service:#VERSION#
container_name: facephi-backend1n-service
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 the same directory, the service will write the log files.
Also, you have to provide the environment variable DATABASE_CONNECT_STRING with the DB connection string (e.g. mongodb://127.0.0.1:27017). For debug purposes, you can disable database operations providing the value no-db. Example:
DATABASE_CONNECT_STRING=no-db
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:
backend1n-service:
ports:
- "6982:6982"
volumes:
- ~/backend1n/config/config.json:/service/config/config.json
- ~/backend1n/config/license.lic:/service/license/license.lic
environment:
LICENSE_PATH: /service/license
DATABASE_CONNECT_STRING: mongodb://127.0.0.1:27017
image: facephicorp.jfrog.io/docker-core-pro-fphi/facephi-backend1n-service:#VERSION#
container_name: facephi-backend1n-service
LICENSE_PATHis a folder with thelicense.licand read and write permissions. In this example,~/backend1n/license/license.lic.
3.2 Service configuration
You can specify another location for the config.json file with the service parameters:
version: '3.7'
services:
backend1n-service:
ports:
- "6982:6982"
volumes:
- ~/backend1n/config:/service/config
- ~/backend1n/service:/service
environment:
CONFIG_FILE: /service/config.json
DATABASE_CONNECT_STRING: mongodb://127.0.0.1:27017
image: facephicorp.jfrog.io/docker-core-pro-fphi/facephi-backend1n-service:#VERSION#
container_name: facephi-backend1n-service
CONFIG_FILEis the path to the configuration file on the additional volume.
If not specified any config.json, this data will be used by default:
{
"port": 6969, # 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 volume/path with read and write permissions for the SDK debug info and SDK usage data, using DEBUG_PATH and USAGE_PATH environment variables:
version: '3.7'
services:
backend1n-service:
ports:
- "6982:6982"
volumes:
- ~/backend1n/config:/service/config
- ~/backend1n/debug:/service/debug
- ~/backend1n/usage:/service/usage
environment:
DEBUG_PATH: /service/debug
USAGE_PATH: /service/usage
DATABASE_CONNECT_STRING: mongodb://127.0.0.1:27017
image: facephicorp.jfrog.io/docker-core-pro-fphi/facephi-backend1n-service:#VERSION#
container_name: facephi-backend1n-service
3.4 Network configuration
In order to be able to connect with our License servers you must add to your firewall's rules the following rules:
| 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 |
Then add the following DNS to your whitelist:
https://api.cryptlex.com:443
https://api.eu.cryptlex.com:443