Skip to content

Commit

Permalink
Updated docker docs for location of data path (#1790)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
  • Loading branch information
MadelineMurray authored and Chris Mckay committed Jul 30, 2019
1 parent 82bf51d commit 538db5d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
4 changes: 0 additions & 4 deletions docs/Configuring-Pantheon/Using-Configuration-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ To specify command line options in a file, use a TOML configuration file.
The configuration file can be saved and reused across node startups. To specify the configuration file,
use the [`--config-file`](../Reference/Pantheon-CLI-Syntax.md#config-file) option.

!!!note
The [`--config-file`](../Reference/Pantheon-CLI-Syntax.md#config-file) option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md).
Use a bind mount to [specify a configuration file with Docker](../Getting-Started/Run-Docker-Image.md#custom-configuration-file).

To override an option specified in the configuration file, specify the same option on the command line or as
an [environment variable](../Reference/Pantheon-CLI-Syntax.md#pantheon-environment-variables). If an option is specified in multiple places,
the order of priority is command line, environment variable, configuration file.
Expand Down
11 changes: 9 additions & 2 deletions docs/Deploying-Pantheon/Migration-Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ was not available and the node key was always read from the data path.
All file options (for example, [`--config-file`](../Reference/Pantheon-CLI-Syntax.md#config-file)) no longer
have a default. Add the relevant command line options to your Pantheon command line and specify the file path.

The [`--data-path`](../Reference/Pantheon-CLI-Syntax.md#data-path) default is now `/opt/pantheon/database`.
The [`--data-path`](../Reference/Pantheon-CLI-Syntax.md#data-path) default is now `/opt/pantheon`.

The [`--node-private-key-file`](../Reference/Pantheon-CLI-Syntax.md#node-private-key-file) default is
now `/opt/pantheon/database/key`.
now `/opt/pantheon/key`.

!!! important
Do not mount a volume at the default data path (`/opt/pantheon`). Mounting a volume at the default
data path path interferes with the operation of Pantheon and prevents Pantheon from safely launching.

To run a node that maintains the node state (key and database), [`--data-path` must be set to a location
other than `/opt/pantheon` and a storage volume mounted at that location](../Getting-Started/Run-Docker-Image.md#starting-pantheon).

The host and port options continue to default to the previously set values.

Expand Down
13 changes: 10 additions & 3 deletions docs/Getting-Started/Run-Docker-Image.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,32 @@ docker run -p <localportJSON-RPC>:8545 -p <localportWS>:8546 -p <localportP2P>:3

## Starting Pantheon

!!! important
Do not mount a volume at the default data path (`/opt/pantheon`). Mounting a volume at the default
data path interferes with the operation of Pantheon and prevents Pantheon from safely launching.

To run a node that maintains the node state (key and database), [`--data-path` must be set to a location
other than `/opt/pantheon` and a storage volume mounted at that location].

### Run a Node for Testing

To run a node that mines blocks at a rate suitable for testing purposes with WebSockets enabled:
```bash
docker run -p 8546:8546 --mount type=bind,source=/<myvolume/pantheon/testnode>,target=/opt/pantheon/database pegasyseng/pantheon:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-ws-enabled --network=dev
docker run -p 8546:8546 --mount type=bind,source=/<myvolume/pantheon/testnode>,target=/var/lib/pantheon pegasyseng/pantheon:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-ws-enabled --network=dev --data-path=/var/lib/pantheon
```

### Run a Node on Rinkeby Testnet

To run a node on Rinkeby:
```bash
docker run -p 30303:30303 --mount type=bind,source=/<myvolume/pantheon/rinkeby>,target=/opt/pantheon/database pegasyseng/pantheon:latest --network=rinkeby
docker run -p 30303:30303 --mount type=bind,source=/<myvolume/pantheon/rinkeby>,target=/var/lib/pantheon pegasyseng/pantheon:latest --network=rinkeby --data-path=/var/lib/pantheon
```

### Run a Node on Ethereum Mainnet

To run a node on Ethereum mainnet with the HTTP JSON-RPC service enabled:
```bash
docker run -p 8545:8545 --mount type=bind,source=/<myvolume/pantheon/rinkeby>,target=/opt/pantheon/database -p 30303:30303 pegasyseng/pantheon:latest --rpc-http-enabled
docker run -p 8545:8545 --mount type=bind,source=/<myvolume/pantheon/rinkeby>,target=/var/lib/pantheon -p 30303:30303 pegasyseng/pantheon:latest --rpc-http-enabled --data-path=/var/lib/pantheon
```

## Stopping Pantheon and Cleaning up Resources
Expand Down

0 comments on commit 538db5d

Please sign in to comment.