-
Notifications
You must be signed in to change notification settings - Fork 2
Config
Wouter den Bakker edited this page Feb 27, 2020
·
3 revisions
Example of a config file. Fill in the required parameters and change any other parameters that you wish to change. For all variables you can choose to replace them with an environment variable instead. Note that all values are prefixed with VSERVER_.
| Name | Type | Default | Description |
|---|---|---|---|
| WSPORT | number | 8080 | The port used to accept incoming websocket connections. Either WSPORT or HTTPPORT or both should be defined. |
| HTTPPORT | number | 8080 | The port used to accept incoming http connections. Either WSPORT or HTTPPORT or both should be defined. |
| DBPASSWORD | string | NONE | The password used to connect to the database. |
| DBUSER | string | miner | The user used to connect to the database. |
| DBNAME | string | blockchain | The name of the database to connect to. |
| DBHOST | string | localhost | The host that runs the database. |
| DBPORT | number | 5432 | The port at which the database is accessible. |
| DBMINCONNECTIONS | number | 0 | The minimum number of database connections to maintain PER worker. Note that 1 connection per worker is maintained to observe new blocks, not counted against this value. |
| DBMAXCONNECTIONS | number | 10 | The maximum number of database connections to maintain PER worker. Note that 1 connection per worker is maintained to observe new blocks, not counted against this value. |
| TLS | boolean | false | Whether to use https/wss or http/ws. If true KEYPATH and CERTPATH should also be defined. |
| KEYPATH | string | NONE | The path where the key can be found. Required if TLS is true. |
| CERTPATH | string | NONE | The path where the certificate can be found. Required if TLS is true. |
| METRICSTOKEN | string | NONE | If this and METRICSINTERVAL are defined basics metrics will be gathered and can be accessed with request type 'metrics' and request data {"format":"json |
| METRICSINTERVAL | number | 0 | How often should it update metrics. |
| LOGLEVEL | number 0-5 | 0 | The log level of what to print to the log. 0=debug, 1=info, 2=warn, 3=error, 4=cricital, 5=off. Any critical error will result in shutting down the miner (in some cases it may be able to restart itsself, but not always). |
| LOGFORMAT | string | The format used for logging. Defaults to '$color$timestamp: $message: $error'. Option $severity is also available.' | |
| SENTRYURL | string | NONE | The url for a sentry installation to which any errors are reported if given. |
| WORKERS | number | -1 | Number of processes to spawn for accepting incoming connections. Either a positive number, or 0/a negative number for the number of CPU cores minus that number (at least 1). |
| TIMEOUT | number | 60 | Interval for keep alive messages in websockets (in seconds). |
| CACHING | boolean | true | Whether to use caching or not. |
| MAXMEMORY | number | 256 | Maximum amount of memory each cluster worker is allowed to use (in MB), if it is higher then that it will automatically be restarted to prevent memory leaks. |
| MAXPAYLOADSIZE | number | 1000000 | Maximum size (in bytes) a request may be before it disconnects. |
{
"VSERVER_LOGLEVEL": 0,
"VSERVER_LOGFORMAT": "$color$timestamp: $message: $error",
"VSERVER_WORKERS": 1,
"VSERVER_WSPORT": 8080,
"VSERVER_HTTPPORT": 8080,
"VSERVER_TIMEOUT": 60,
"VSERVER_DBUSER": "backend",
"VSERVER_DBPASSWORD": "",
"VSERVER_DBNAME": "blockchain",
"VSERVER_DBPORT": 5432,
"VSERVER_DBMINCONNECTIONS": 0,
"VSERVER_DBMAXCONNECTIONS": 10,
"VSERVER_MAXMEMORY": 256,
"VSERVER_TLS": false,
"VSERVER_KEYPATH": "",
"VSERVER_CERTPATH": "",
"VSERVER_CACHING": true,
"VSERVER_MAXPAYLOADSIZE": 1000000,
"VSERVER_METRICSINTERVAL": 0,
"VSERVER_METRICSTOKEN": ""
}