Skip to content

Backend configuration

Service configuration is performed via environment variables.

Environment variables

The environment variables of the backend service can be grouped by configuration areas.

Common

Variable Default Valid values Description
LISTEN localhost:8085 host:port Backend service address
STATE_DIRECTORY Service working directory Directory path Directory containing the current state of the service
GRACEFUL_TIMEOUT 15s Any numbers with associated time units s, m, h Defines the duration after which the backend service process is forcibly terminated when a graceful shutdown has been initiated

Logging

Variable Default Valid values Description
LOG_LEVEL debug debug, info, warn, error Log level of the backend service
GORM_LOG_LEVEL warn silent, info, warn, error Log level of the database
GORM_LOG_PARAM_QUERIES 1 0 — included, 1 — not included Controls the inclusion of SQL parameters in logs
LOG_FILE not specified File in JSON format Log output file

Important

The LOG_LEVEL variable has priority over GORM_LOG_LEVEL.

Detailed information about the available logging levels is presented in the table below.

Level Description
debug Logs all information, including debug messages and internal service details. Only available for LOG_LEVEL
info Logs general information about service operation: launch, shutdown, request handling.
warn Logs warnings about potentially problematic situations that are not critical but deserve attention
error Logs errors only
silent Completely disables database logging. Only available for GORM_LOG_LEVEL

Audit

Variable Default Valid values Description
AUDIT_LOG 1 1 — used, 0 — not used Controls the use of the audit log for backend events
APP_AUDIT_LOG 0 1 — used, 0 — not used Controls the use of the audit log for scanned application events
AUDIT_LOG_FILE not specified File in JSONL format Audit log file

Databases

Variable Default Valid values Description
DATABASE_URI postgresql://solidpoint:solidpoint@127.0.0.1:5432/solidpoint URI in postgresql://user:password@host:port/db format Database URI
DATABASE_URI_FILE not specified Text file File containing the database URI
DB_MAX_OPEN_CONNECTIONS 80 Positive integer Maximum number of concurrent open connections to the database
DB_MAX_IDLE_CONNECTIONS 50 Positive integer Maximum number of idle connections
DB_MAX_CONN_LIFETIME 5m Any numbers with associated time units s, m, h Maximum time interval during which a connection can be reused. If the specified time is exceeded, the connection is terminated
BATCH_SIZE 100 Positive integer Maximum size of a data set for bulk insertion into a table

Migrations and state

Variable Default Valid values Description
MIGRATIONS_UP 1 1 — in progress, 0 — not in progress Indicates whether a migration (or rollback) is currently in progress
DATABASE_DIRTY 0 1 — error, 0 — OK Indicates that the last migration failed or the database is inconsistent
FORCE_VERSION 0 Positive integer Force setting the migration version. After manually applying a failed migration, set DATABASE_DIRTY=1, FORCE_VERSION=[migration number]

Scan synchronization

Variable Default Valid values Description
SYNC_SCANS 1 1 — used, 0 — not used Controls the synchronization of scans created through different methods when the backend starts
RESYNC_SCANS 0 1 — used, 0 — not used Controls the synchronization of scans created on different scan nodes when the backend starts

SMTP client

Detailed information about the SMTP client is available in the “Notifications” section.

Interaction with the scanner

Variable Default Valid values Description
SCANNER_MAX_CALL_RECV_MSG_SIZE_MB 100 Positive integer Maximum size of a message received from the scanner (in MB)
SCANNER_SELECTION_STRATEGY RoundRobin RoundRobin, LeastLoaded Specifies the algorithm for selecting a scan node

Report generator

Variable Default Valid values Description
REPORTER_ADDRESS localhost:9090 host:port Address of the report generator for scans

Detailed information about the report generator is available in the “PDF Report Generator” section.