Commit 67ff6fb0 authored by Rinke Hendriksen's avatar Rinke Hendriksen Committed by GitHub

Added instructions on how to run multiple bee nodes with docker-compose (#1205)

parent 4e6554e3
......@@ -7,7 +7,7 @@ mkdir -p bee && cd bee
wget -q https://raw.githubusercontent.com/ethersphere/bee/master/packaging/docker/docker-compose.yml
wget -q https://raw.githubusercontent.com/ethersphere/bee/master/packaging/docker/env -O .env
```
Set all inside `.env`
Set all configuration variables inside `.env`
To configure `clef` set:
- `CLEF_CHAINID=5` for goerli
......@@ -35,5 +35,20 @@ docker-compose up -d
From logs find URL line with `on goerli you can get both goerli eth and goerli bzz from` and prefund your node
```
docker-compose logs -f bee
docker-compose logs -f bee-1
```
## Running multiple Bee nodes
It is easy to run multiple bee nodes with docker compose by adding more services to `docker-compose.yaml`
To do so, open `docker-compose.yaml`, copy lines 3-58 and past this after line 58.
In the copied lines, replace all occurences of `bee-1` with `bee-2`, `clef-1` with `clef-2` and adjust the `API_ADDR` and `P2P_ADDR` and `DEBUG_API_ADDR` to respectively `1733`, `1734` and `127.0.0.1:1735`
Lastly, add your newly configured services under `volumes` (last lines), such that it looks like:
```yaml
volumes:
clef-1:
bee-1:
bee-2:
clef-2:
```
If you want to create more than two nodes, simply repeat the process above, ensuring that you keep unique name for your bee and clef services and update the ports
\ No newline at end of file
version: "3"
services:
clef:
image: ethersphere/clef:0.4.4
clef-1:
image: ethersphere/clef:0.4.7
restart: unless-stopped
environment:
- CLEF_CHAINID
volumes:
- clef:/app/data
- clef-1:/app/data
command: full
bee:
image: ethersphere/bee:0.4.1
bee-1:
image: ethersphere/bee:0.4.2
restart: unless-stopped
environment:
- BEE_API_ADDR
......@@ -52,10 +52,10 @@ services:
- "${P2P_ADDR:-1634}${BEE_P2P_ADDR:-:1634}"
- "${DEBUG_API_ADDR:-127.0.0.1:1635}${BEE_DEBUG_API_ADDR:-:1635}"
volumes:
- bee:/home/bee/.bee
- bee-1:/home/bee/.bee
command: start
depends_on:
- clef
- clef-1
volumes:
clef:
bee:
clef-1:
bee-1:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment