factoryinsight

Technical documentation of the microservice factoryinsight, which fetches manufacturing data and calculates various Key Performance Indicators.

Getting started

Here is a quick tutorial on how to start up basic configuration or, respectively, a docker-compose stack, for development purposes.

Go to the root folder of the project and execute the following command:

sudo docker build -f deployment/factoryinsight/Dockerfile -t factoryinsight:latest .
sudo docker run factoryinsight:latest

Environment variables

Variable nameDescriptionTypePossible valuesExample Values
LOGGING_LEVELDefines which logging level is used, mostly relevant for developers. If logging level is not DEVELOPMENT, default logging will be usedstringanyDEVELOPMENT
POSTGRES_HOSTSpecificies the database DNS name / IP-address for postgreSQL / TimescaleDBstringall DNS names or IP adressesunited-manufacturing-hub
POSTGRES_PORTSpecifies the database port for postgreSQLintvalid port number5432
POSTGRES_USERSpecifies the database user that should be usedstringan existing user with access to the specified database in postgreSQLfactoryinsight
POSTGRES_PASSWORDSpecifies the database password that should be usedstringallchangeme
POSTGRES_DATABASESpecifies the database name that should be usedstringallfactoryinsight
CUSTOMER_NAME_{NUMBER}Specifices a user for the REST APIstringalljeremy
CUSTOMER_PASSWORD_{NUMBER}Specifies the password for the user for the REST APIstringallchangeme
FACTORYINSIGHT_USERSpecifies the admin user for the REST APIstringalljeremy
FACTORYINSIGHT_PASSWORDSpecifies the password for the admin user for the REST APIstringallchangeme
VERSIONThe version of the API usedintall1
REDIS_URIURI for accessing redis sentinelstringall valid URIsunited-manufacturing-hub-redis-node-0.united-manufacturing-hub-redis-headless:26379
REDIS_URI2Backup URI for accessing redis sentinelstringall valid URIsunited-manufacturing-hub-redis-node-0.united-manufacturing-hub-redis-headless:26379
REDIS_URI3Backup URI for accessing redis sentinelstringall valid URIsunited-manufacturing-hub-redis-node-0.united-manufacturing-hub-redis-headless:26379
REDIS_PASSWORDPassword for accessing redis sentinelstringallchangeme
DRY_RUNIf enabled, data wont be stored in database(default: false)booltrue, falsetrue

REST API endpoints