From 2b969502ed249b57c58a3472ea13e07f1f6645b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lewandowski?= Date: Mon, 22 Jan 2024 15:25:16 +0100 Subject: [PATCH] chore(BUX-506): update bux-server config description --- README.md | 8 +++++ config.example.yaml | 84 ++++++++++++++++++++++----------------------- 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 2ce91a8b0..148e2dfc9 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,14 @@ vet Run the Go vet application ## Usage +> Every variable which is used and can be configured is described in [config.example.yaml](/config/config.example.yaml) + + +### Defaults + +If you run Bux-Server without editing anything, it will use the default configuration from file [defaults.go](/config/defaults.go). It is set up to use _freecache_, _sqlite_ with enabled _paymail_ with _signing disabled_ and without _beef_. + + ### Config Variables Default config variables can be overridden by (in this order of importance): diff --git a/config.example.yaml b/config.example.yaml index 373296861..cc106ff16 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -1,16 +1,16 @@ auth: - admin_key: xpub661MyMwAqRbcFgfmdkPgE2m5UjHXu9dj124DbaGLSjaqVESTWfCD4VuNmEbVPkbYLCkykwVZvmA8Pbf8884TQr1FgdG2nPoHR8aB36YdDQh - require_signing: false - scheme: xpub - signing_disabled: true + admin_key: xpub661MyMwAqRbcFgfmdkPgE2m5UjHXu9dj124DbaGLSjaqVESTWfCD4VuNmEbVPkbYLCkykwVZvmA8Pbf8884TQr1FgdG2nPoHR8aB36YdDQh # xpub used for admin api authentication + require_signing: false # require checking signatures for all requests which was registered with RequireAuthentication method + scheme: xpub # authentication scheme - xpub => using xPubs as tokens, currently the only option + signing_disabled: true # disable signing for all requests !!! Use only for development !!! cache: cluster: - coordinator: memory - prefix: bux_cluster_ + coordinator: memory # cluster coordinator - redis/memory + prefix: bux_cluster_ # prefix for channel names redis: null - engine: freecache + engine: freecache # cache engine - freecache/redis # Prefixed with "_", because it's unused by default - _redis: + _redis: # redis configuration dependency_mode: true max_active_connections: 0 max_connection_lifetime: 1m0s @@ -20,11 +20,11 @@ cache: use_tls: false db: datastore: - debug: false - engine: sqlite - table_prefix: xapi + debug: false # enable datastore debug mode + engine: sqlite # datastore engine - sqlite/postgres/mysql + table_prefix: xapi # prefix for all tables # Prefixed with "_", because it's unused by default - _mongodb: + _mongodb: # mongodb configuration database_name: xapi debug: false max_connection_idle_time: 0s @@ -35,7 +35,7 @@ db: transactions: false uri: mongodb://localhost:27017/xapi # Prefixed with "_", because it's unused by default - _sql: + _sql: # sql (postgresql and mysql) configuration debug: false driver: postgresql host: localhost @@ -52,7 +52,7 @@ db: time_zone: UTC tx_timeout: 10s user: postgres - sqlite: + sqlite: # sqlite configuration database_path: ./bux.db debug: false max_connection_idle_time: 0s @@ -61,50 +61,50 @@ db: max_open_connections: 0 shared: true table_prefix: "" -debug: true -debug_profiling: true -disable_itc: true +debug: true # enable debug mode +debug_profiling: true # enable endpoints that provides profiling information +disable_itc: true # enable (ITC) incoming transaction checking # Prefixed with "_", because it's unused by default graphql: - enabled: false -import_block_headers: "" + enabled: false # enables graphql +import_block_headers: "" # url to import block headers # Prefixed with "_", because it's unused by default _new_relic: - domain_name: domain.com - enabled: false - license_key: BOGUS-LICENSE-KEY-1234567890987654321234 + domain_name: domain.com # used for relic HostDisplayName + enabled: false # enable new relic + license_key: BOGUS-LICENSE-KEY-1234567890987654321234 # relic license key # Prefixed with "_", because it will be configured by default _nodes: - protocol: arc - apis: + protocol: arc # protocol - arc/mapi (arc is default) + apis: # list of apis used for getting and broadcasting transactions - arc_url: https://arc.gorillapool.io token: - use_fee_quotes: true + use_fee_quotes: true # use fee quotes for transaction fee calculation fee_unit: satoshis: 1 bytes: 1000 # Prefixed with "_", because it's unused by default _notifications: - enabled: false - webhook_endpoint: "" + enabled: false # enables notifications about transactions + webhook_endpoint: "" # url to send notifications paymail: # Prefixed with "_", because it's unused by default - _beef: + _beef: # beef configuration pulse_auth_token: mQZQ6WmxURxWz5ch - pulse_url: http://localhost:8080/api/v1/chain/merkleroot/verify - use_beef: false - default_from_paymail: from@domain.com - default_note: bux Address Resolution - domain_validation_enabled: false - domains: + pulse_url: http://localhost:8080/api/v1/chain/merkleroot/verify # url to pulse, used for merkle root verification + use_beef: false # enable BEEF + default_from_paymail: from@domain.com # set is as a default sender paymail if account does not have one + default_note: bux Address Resolution # default note added into transactions - Deprecated + domain_validation_enabled: false # enable paymail domain validation, paymail domain must be in domains list to be valid and that the transaction can be processed + domains: # list of domains used for paymail domain validation - localhost - enabled: true - sender_validation_enabled: false -request_logging: true + enabled: true # enable paymail + sender_validation_enabled: false # validates sender signature during receiving transactions +request_logging: true # show logs about incoming requests server_config: - idle_timeout: 1m0s - port: 3003 - read_timeout: 15s - write_timeout: 15s + idle_timeout: 1m0s # maximum amount of time to wait for the next request when keep-alives are enabled. If IdleTimeout is zero, the value of ReadTimeout is used. If both are zero, there is no timeout + port: 3003 # port of the http server + read_timeout: 15s # maximum duration for reading the entire request, including the body. A zero or negative value means there will be no timeout + write_timeout: 15s # maximum duration before timing out writes of the response. A zero or negative value means there will be no timeout task_manager: - factory: memory + factory: memory # task manager factory - memory, redis