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.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. You must mount a configuration volume in /app/selphid-sdk/config
to host the license and logs. You can also connect separate volumes for each case.
version: '3.7'
services:
selphid-service:
ports:
- "8080:8080"
volumes:
- ~/selphi/config:/app/selphid-sdk/config
- ~/selphi/license:/app/selphid-sdk/license # Optional
- ~/selphi/service:/app/selphid-sdk/service # Optional
- ~/selphi/debug:/app/selphid-sdk/debug # Optional
- ~/selphi/usage:/app/selphid-sdk/usage # Optional
image: facephicorp.jfrog.io/docker-pro-fphi/facephi-selphid-sdk:#VERSION#
environment:
LICENSE_PATH: /app/selphid-sdk/license # Optional
CONFIG_FILE: /app/selphid-sdk/service/config.json # Optional
DEBUG_PATH: /app/selphid-sdk/debug # Optional
USAGE_PATH: /app/selphid-sdk/usage # Optional
container_name: facephi-selphid-sdk
Run the following command, inside the folder where the docker-compose.yml
file is located, to deploy the service:
docker compose up
3. Configuration
3.1 License
To use this service, you need to have a valid license.lic
file. By default, the service will look por this file in volume attached to /app/selphid-sdk/config/license.lic
, but you can use another volume for license:
version: '3.7'
services:
selphid-service:
ports:
- "8080:8080"
volumes:
- ~/selphi/config:/app/selphid-sdk/config
- ~/selphi/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
3.2 Service
You can specify a config file for the service. By default, the service will look por this file in /app/selphid-sdk/config/config.json
version: '3.7'
services:
selphid-service:
ports:
- "8080:8080"
volumes:
- ~/selphi/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
If not specified, 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:
version: '3.7'
services:
selphid-service:
ports:
- "8080:8080"
volumes:
- ~/selphi/config:/app/selphid-sdk/config
- ~/selphi/debug:/app/selphid-sdk/debug
- ~/selphi/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