Configuration - TUMFARSynchrony/SynthARium GitHub Wiki
Configuration
There are several configuration options when setting up this project. If using the installer, some of the configurations such as Password, Dockerized OpenFace, ChatGPT, and Ngrok tokens, are accessible and can be enabled on the Launcher page. For those using a manual build/setup, the configurations are set in the .env
file and config.json
for the frontend and backend respectively.
Frontend Configuration
The frontend is configured using frontend/.env
.
VITE_BACKEND
: address of the backend server. Only used if server is served using development mode. Make sure to use the correct protocol (http vs. https)VITE_CHAT_GPT_API_KEY
- optional : a API key which can be bought from OpenAI and configured to be used for the experimenter or participants.VITE_ICE_SERVERS
- optional : list of ICE servers which are used when users are connecting to backendHTTPS
: Whether HTTPS should be used. Only used if server is served using development modeSSL_CRT_FILE
- optional : Path to SSL certificate. If not specified a self-signed certificate is used. Only used if server is served using development modeSSL_KEY_FILE
- optional : Path to SSL key. If not specified a self-signed certificate is used. Only used if server is served using development mode
[!NOTE] Please make sure to restart the development server or the rebuild the app after changing the config.
Backend Configuration
The backend is configured using backend/config.json
.
experimenter_password
- str: password experimenters must provide to authenticate themselveshost
- str : host address the backend should useport
- int : port the backend should useenvironment
- str :dev
orprod
serve_frontend
- bool : Whether the server should serve the frontend out of thefrontend/build
folder. Set tofalse
if the frontend is hosted by a different server (see note bellow)- Developer Note: A better way to host the frontend would be using a Reverse Proxy like nginx or CDN services, as noted in aiohttp which we use for hosting.
https
- bool : Whether the backend should use httpsssl_cert
- str : path to ssl certificate. Only used if https is truessl_key
- str : path to ssl private key. Only used if https is truelog
- str : Logging level for Hub. Must be one of:CRITICAL
,ERROR
,WARNING
,INFO
,DEBUG
. Default:INFO
log_file
- null | str : If given, the logger will write the log into the file instead of the consolelog_dependencies
- str : Logging level for project 3rd party dependencies (see requirements.txt). Must be one of:CRITICAL
,ERROR
,WARNING
,INFO
,DEBUG
. Default:WARNING
. UsingINFO
orDEBUG
may lead to a strong increase in output.ping_subprocesses
- float : If greater than 0, all subprocesses will be pinged in an interval defined by the value ofping_subprocesses
(in seconds). Used for debugging, default should be0.0
.experimenter_multiprocessing
- bool : If true, experimenter connections will be executed on independent processesparticipant_multiprocessing
- bool : If true, participant connections will be executed on independent processes
Logging overview
The following logging levels are available for log
and log_dependencies
in the configuration:
Logger output | DEBUG |
INFO |
WARNING |
ERROR |
CRITICAL |
---|---|---|---|---|---|
debug | x | - | - | - | - |
info | x | x | - | - | - |
warning | x | x | x | - | - |
error | x | x | x | x | - |
critical | x | x | x | x | x |
- If the logger is set to
INFO
, information with the debug level is ignored and only important events are logged, possibly with less detail. - If the logger is set to
DEBUG
everything is logged. This also includes additional information that can be helpful in debugging.