mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
blockchain
This commit is contained in:
@@ -38,7 +38,7 @@ $ docker pull bigchaindb/bigchaindb:all-in-one
|
||||
$ docker run \
|
||||
--detach \
|
||||
--name bigchaindb \
|
||||
--publish 9984:9984 \
|
||||
--publish 3333:3333 \
|
||||
--publish 9985:9985 \
|
||||
--publish 27017:27017 \
|
||||
--publish 26657:26657 \
|
||||
@@ -52,7 +52,7 @@ Let's analyze that command:
|
||||
|
||||
* `docker run` tells Docker to run some image
|
||||
* `--detach` run the container in the background
|
||||
* `publish 9984:9984` map the host port `9984` to the container port `9984`
|
||||
* `publish 3333:3333` map the host port `3333` to the container port `3333`
|
||||
(the BigchainDB API server)
|
||||
* `9985` BigchainDB Websocket server
|
||||
* `27017` Default port for MongoDB
|
||||
|
||||
@@ -113,14 +113,14 @@ are settings for the [Gunicorn HTTP server](http://gunicorn.org/), which is used
|
||||
|
||||
`server.bind` is where to bind the Gunicorn HTTP server socket. It's a string. It can be any valid value for [Gunicorn's bind setting](http://docs.gunicorn.org/en/stable/settings.html#bind). For example:
|
||||
|
||||
* If you want to allow IPv4 connections from anyone, on port 9984, use `0.0.0.0:9984`
|
||||
* If you want to allow IPv6 connections from anyone, on port 9984, use `[::]:9984`
|
||||
* If you want to allow IPv4 connections from anyone, on port 3333, use `0.0.0.0:3333`
|
||||
* If you want to allow IPv6 connections from anyone, on port 3333, use `[::]:3333`
|
||||
|
||||
In a production setting, we recommend you use Gunicorn behind a reverse proxy server such as NGINX. If Gunicorn and the reverse proxy are running on the same machine, then you can use `localhost:9984` (the default value), meaning Gunicorn will talk to the reverse proxy on port 9984. The reverse proxy could then be bound to port 80 (for HTTP) or port 443 (for HTTPS), so that external clients would connect using that port. For example:
|
||||
In a production setting, we recommend you use Gunicorn behind a reverse proxy server such as NGINX. If Gunicorn and the reverse proxy are running on the same machine, then you can use `localhost:3333` (the default value), meaning Gunicorn will talk to the reverse proxy on port 3333. The reverse proxy could then be bound to port 80 (for HTTP) or port 443 (for HTTPS), so that external clients would connect using that port. For example:
|
||||
|
||||
[External clients]---(port 443)---[NGINX]---(port 9984)---[Gunicorn / BigchainDB Server]
|
||||
[External clients]---(port 443)---[NGINX]---(port 3333)---[Gunicorn / BigchainDB Server]
|
||||
|
||||
If Gunicorn and the reverse proxy are running on different machines, then `server.bind` should be `hostname:9984`, where hostname is the IP address or [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) of the reverse proxy.
|
||||
If Gunicorn and the reverse proxy are running on different machines, then `server.bind` should be `hostname:3333`, where hostname is the IP address or [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) of the reverse proxy.
|
||||
|
||||
There's [more information about deploying behind a reverse proxy in the Gunicorn documentation](http://docs.gunicorn.org/en/stable/deploy.html). (They call it a proxy.)
|
||||
|
||||
@@ -133,7 +133,7 @@ for more information.
|
||||
**Example using environment variables**
|
||||
|
||||
```text
|
||||
export BIGCHAINDB_SERVER_BIND=0.0.0.0:9984
|
||||
export BIGCHAINDB_SERVER_BIND=0.0.0.0:3333
|
||||
export BIGCHAINDB_SERVER_LOGLEVEL=debug
|
||||
export BIGCHAINDB_SERVER_WORKERS=5
|
||||
```
|
||||
@@ -142,7 +142,7 @@ export BIGCHAINDB_SERVER_WORKERS=5
|
||||
|
||||
```js
|
||||
"server": {
|
||||
"bind": "0.0.0.0:9984",
|
||||
"bind": "0.0.0.0:3333",
|
||||
"loglevel": "debug",
|
||||
"workers": 5,
|
||||
}
|
||||
@@ -152,7 +152,7 @@ export BIGCHAINDB_SERVER_WORKERS=5
|
||||
|
||||
```js
|
||||
"server": {
|
||||
"bind": "localhost:9984",
|
||||
"bind": "localhost:3333",
|
||||
"loglevel": "info",
|
||||
"workers": null,
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ to allow all incoming and outgoing traffic for:
|
||||
* Any protocol on port 26656 (Tendermint P2P)
|
||||
|
||||
If you don't care about HTTPS, then forget about port 443,
|
||||
and replace port 80 with port 9984 (the default BigchainDB HTTP port).
|
||||
and replace port 80 with port 3333 (the default BigchainDB HTTP port).
|
||||
|
||||
## Update Your System
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@ To configure BigchainDB Server, run:
|
||||
bigchaindb configure
|
||||
```
|
||||
|
||||
The first question is ``API Server bind? (default `localhost:9984`)``.
|
||||
The first question is ``API Server bind? (default `localhost:3333`)``.
|
||||
|
||||
* If you're using NGINX (e.g. if you want HTTPS),
|
||||
then accept the default value (`localhost:9984`).
|
||||
* If you're not using NGINX, then enter the value `0.0.0.0:9984`
|
||||
then accept the default value (`localhost:3333`).
|
||||
* If you're not using NGINX, then enter the value `0.0.0.0:3333`
|
||||
|
||||
You can accept the default value for all other BigchainDB config settings.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user