Configuration Parameters

In this section you will find all options which are configurable to make the application fit your needs.

When you have natively installed the MUSCLE application , create a file called .muscleenv (alternatively .env) in the top level directory of the backend source, where you export all configuration parameters.

When you are using docker, you can export the variables in the docker compose file or when starting the container with -e.


Below are the configurable parameters of the following form:

CONFIGURATION_PARAMETER = default_value

Application

MUSCLE_BRAND_NAME = MUSCLE

The brand name which will be displayed in the application.


MUSCLE_USER_DEFAULT_PW = muscle

The default password which a user gets if no other is specified in the register procedure.


MUSCLE_USER_PWD_MIN_LENGTH = 8

The minimum password length, this does not affect the default password.


Database

MUSCLE_DB_PATH = <BACKEND_INSTALL_DIR>/backend/database/

The path where the database file gets stored.


MUSCLE_DB_NAME = muscle.db

The name of the database file. Since the used DB is SQLite, it is a single file.


Devices

MUSCLE_DEVICE_RESP_TIMEOUT = 1000

The maximum time in milliseconds the application will wait for a device to answer.


MUSCLE_DEVICE_OFFLINE_SAMPLING = 60000

The sampling in milliseconds for the application to poll the devices for dashboard data if they are offline. This is mostly to detect when the device gets available.


MUSCLE_DEVICE_ONLINE_SAMPLING = 10000

The sampling in milliseconds for the application to poll the devices for dashboard data if they are online but no action initiated by the application is taking place.


MUSCLE_DEVICE_RUNNING_SAMPLING = 1000

The sampling in milliseconds for the application to poll the devices for dashboard data if the device is fulfilling a task initiated by the application.


Logging

MUSCLE_LOG_PATH = <MUSCLE_INSTALL_DIR>/logs/

Where the access and application logs will be stored.


LOG_MAX_SIZE = 10485760 

Maximum size of one log file in Bytes, default is 10MiB. When the size is reached a new one will be created, at maximum LOG_MAX_BACKUPS before the oldest gets overwritten.


LOG_MAX_BACKUPS = 5

How many log files to store before overwriting the oldest one.


MUSCLE_LOG_FILE = muscle.log

The name of the application log file.


MUSCLE_LOG_LEVEL = INFO

Log level for the device log. Can be either DEBUG, INFO, WARNING, ERROR or CRITICAL


MUSCLE_ACCESS_LOG_ENABLE = true

Enable server access logs.


MUSCLE_ACCESS_LOG_FILE = muscle_access.log

The name of the access log file.


Traefik

MUSCLE_TRAEFIK_ENABLE = False

Enable traefik. When this option is True the devices can be registered either with or without traefik. If this is enabled after some devices are registered already, you will have to manually adjust them in the manage section of the frontend.

Enabling this option requires MUSCLE_DOMAIN_NAME to be configured.


MUSCLE_DOMAIN_NAME = False

Set the domain name of your muscle website. This is most likely the same as in your docker configuration. This must be set if MUSCLE_TREAFIK_ENABLE is True.


TRAEFIK_OUTPUT_PATH = <BACKEND_INSTALL_DIR>/traefik_devices/

Set the path to where to store the dynamic device configurations for traefik. This directory must then be configured in the traefik configuration.