Skip to content

INE 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-pro-fphi/facephi-ine-service:#VERSION#

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

2. docker-compose

One way to deploy the service is to create a docker-compose.yml file with the following content:

version: '3.7'

services:
  ine-service:
    ports:
      - "6982:6982"
    volumes:
      - ./config:/service/config
      - ./logs:/service/logs
    image: facephicorp.jfrog.io/docker-core-pro-fphi/facephi-ine-service:latest
    container_name: facephi-ine-service

Note the volumes that are mounted in the container. These volumes are used to store the configuration files of the service and write the logger output.

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

    docker-compose up

3. Configuration

The config file could contain the following information:

{
    "port": 6982,                   # Service port number.
    "number_of_threads": 1,         # The number of IO threads, 1 by default, if the value is set to 0, the number of threads is the number of CPU cores.
    "connection_timeout": 60,       # 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": 50,     # The maximum size of the body allowed in the requests in Mb.
                                    # The default value of 100 Mb.
    "logger_path" : "/service",     # The path to the log file. 
    "logger_level" : "trace",       # Set the log level. [trace|debug|info|warn|error|fatal|off]
    "logger_rotation" : "daily",    # Set the log rotation. [hourly|daily]
    "logger_max_files" : 31         # Set the maximum number of log files.
}

The config file can be passed as a parameter to the service. By default the service will look for a file named /service/config/config.json.