mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Support for advertised host, port, scheme for Websockets (#1703)
* Support for advertised host, port, scheme for Websockets * Update docs * Add a docstring * Set env vars in Dockerfile-dev too
This commit is contained in:
@@ -24,6 +24,9 @@ For convenience, here's a list of all the relevant environment variables (docume
|
||||
`BIGCHAINDB_WSSERVER_SCHEME`<br>
|
||||
`BIGCHAINDB_WSSERVER_HOST`<br>
|
||||
`BIGCHAINDB_WSSERVER_PORT`<br>
|
||||
`BIGCHAINDB_WSSERVER_ADVERTISED_SCHEME`<br>
|
||||
`BIGCHAINDB_WSSERVER_ADVERTISED_HOST`<br>
|
||||
`BIGCHAINDB_WSSERVER_ADVERTISED_PORT`<br>
|
||||
`BIGCHAINDB_CONFIG_PATH`<br>
|
||||
`BIGCHAINDB_BACKLOG_REASSIGN_DELAY`<br>
|
||||
`BIGCHAINDB_LOG`<br>
|
||||
@@ -248,6 +251,38 @@ export BIGCHAINDB_WSSERVER_PORT=9985
|
||||
}
|
||||
```
|
||||
|
||||
## wsserver.advertised_scheme, wsserver.advertised_host and wsserver.advertised_port
|
||||
|
||||
These settings are for the advertising the Websocket URL to external clients in
|
||||
the root API endpoint. These configurations might be useful if your deployment
|
||||
is hosted behind a firewall, NAT, etc. where the exposed public IP or domain is
|
||||
different from where BigchainDB is running.
|
||||
|
||||
**Example using environment variables**
|
||||
```text
|
||||
export BIGCHAINDB_WSSERVER_ADVERTISED_SCHEME=wss
|
||||
export BIGCHAINDB_WSSERVER_ADVERTISED_HOST=mybigchaindb.com
|
||||
export BIGCHAINDB_WSSERVER_ADVERTISED_PORT=443
|
||||
```
|
||||
|
||||
**Example config file snippet**
|
||||
```js
|
||||
"wsserver": {
|
||||
"advertised_scheme": "wss",
|
||||
"advertised_host": "mybigchaindb.com",
|
||||
"advertised_port": 443
|
||||
}
|
||||
```
|
||||
|
||||
**Default values (from a config file)**
|
||||
```js
|
||||
"wsserver": {
|
||||
"advertised_scheme": "ws",
|
||||
"advertised_host": "localhost",
|
||||
"advertised_port": 9985
|
||||
}
|
||||
```
|
||||
|
||||
## backlog_reassign_delay
|
||||
|
||||
Specifies how long, in seconds, transactions can remain in the backlog before being reassigned. Long-waiting transactions must be reassigned because the assigned node may no longer be responsive. The default duration is 120 seconds.
|
||||
|
||||
Reference in New Issue
Block a user