Backend configuration file¶
This section describes parameters in the backend configuration file.
About the backend configuration file¶
Backend configuration file defines configuration for a GAChain node.
Location¶
This file is located in the directory with the backend binary and is named config.toml
.
Sections¶
The configuration file has several sections:
-
default section
This section defines general parameters.
-
[TCPServer]
This section defines parameters for TCPServer.
TCPServer supports the network interaction between nodes.
-
[HTTP]
This section defines parameters for HTTPServer.
HTTPServer provides REST API.
-
[DB]
This section defines parameters for the node’s database engine, PostgreSQL.
-
[StatsD]
This section defines parameters for the node operation metrics collector, StatsD.
-
[Centrifugo]
This section defines parameters for the notifications service, Centrifugo.
-
[Log]
This section defines parameters for the logger service, Log.
-
[TokenMovement]
This section defines parameters for the tokens circulation service, TokenMovement.
Configuration file example¶
PidFilePath = "/gachain-data/go-gachain.pid"
LockFilePath = "/gachain-data/go-gachain.lock"
DataDir = "/gachain-data"
KeysDir = "/gachain-data"
TempDir = "/var/folders/_l/9md_m4ms1651mf5pbng1y1xh0000gn/T/gachain-temp"
FirstBlockPath = "/gachain-data/1block"
TLS = false
TLSCert = ""
TLSKey = ""
OBSMode = "none"
HTTPServerMaxBodySize = 1048576
MaxPageGenerationTime = 3000
NodesAddr = []
[TCPServer]
Host = "127.0.0.1"
Port = 7078
[HTTP]
Host = "127.0.0.1"
Port = 7079
[DB]
Name = "gachain"
Host = "127.0.0.1"
Port = 5432
User = "postgres"
Password = "gachain"
LockTimeout = 5000
[StatsD]
Host = "127.0.0.1"
Port = 8125
Name = "gachain"
[Centrifugo]
Secret = "127.0.0.1"
URL = "127.0.0.1"
[Log]
LogTo = "stdout"
LogLevel = "ERROR"
LogFormat = "text"
[Log.Syslog]
Facility = "kern"
Tag = "go-gachain"
[TokenMovement]
Host = ""
Port = 0
Username = ""
Password = ""
To = ""
From = ""
Subject = ""