Skip to content

Commit

Permalink
chore(BUX-506): update bux-server config description
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Jan 22, 2024
1 parent 7ee7a8a commit 2b96950
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 42 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
84 changes: 42 additions & 42 deletions config.example.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit 2b96950

Please sign in to comment.