Skip to content

Commit

Permalink
feat: remove all clef from docker-compose (#4252)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandot authored Aug 15, 2023
1 parent be21479 commit 551d16d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
12 changes: 4 additions & 8 deletions packaging/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Docker compose

The docker-compose provides an app container for Bee itself and a signer container for Clef.
The docker-compose provides an app container for Bee.
To prepare your machine to run docker compose execute
```
mkdir -p bee && cd bee
Expand All @@ -9,8 +9,6 @@ wget -q https://raw.githubusercontent.com/ethersphere/bee/master/packaging/docke
```
Set all configuration variables inside `.env`

`clef` is configured with `CLEF_CHAINID=5` for goerli

If you want to run node in full mode, set `BEE_FULL_NODE=true`

Bee requires an Ethereum endpoint to function. Obtain a free Infura account and set:
Expand Down Expand Up @@ -44,15 +42,13 @@ docker-compose pull && docker-compose up -d

## 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`
To do so, open `docker-compose.yaml`, copy lines 4-54 and past this after line 54 (whole bee-1 section).
In the copied lines, replace all occurences of `bee-1` with `bee-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
If you want to create more than two nodes, simply repeat the process above, ensuring that you keep unique name for your bee services and update the ports
15 changes: 1 addition & 14 deletions packaging/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
version: "3"

services:
clef-1:
image: ethersphere/clef:0.6.0
restart: unless-stopped
environment:
- CLEF_CHAINID
volumes:
- clef-1:/app/data
command: full

bee-1:
image: ethersphere/bee:stable
restart: unless-stopped
Expand All @@ -18,8 +9,6 @@ services:
- BEE_BLOCK_TIME
- BEE_BOOTNODE
- BEE_BOOTNODE_MODE
- BEE_CLEF_SIGNER_ENABLE
- BEE_CLEF_SIGNER_ENDPOINT=http://clef-1:8550
- BEE_CONFIG
- BEE_CORS_ALLOWED_ORIGINS
- BEE_DATA_DIR
Expand Down Expand Up @@ -63,8 +52,6 @@ services:
volumes:
- bee-1:/home/bee/.bee
command: start
depends_on:
- clef-1

volumes:
clef-1:
bee-1:
9 changes: 0 additions & 9 deletions packaging/docker/env
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Copy this file to .env, then update it with your own settings

### CLEF

## chain id to use for signing (100=mainnet(xdai), 5=testnet(goerli)) (default: 12345)
CLEF_CHAINID=5

### BEE

## HTTP API listen address (default :1633)
Expand All @@ -15,10 +10,6 @@ CLEF_CHAINID=5
# BEE_BOOTNODE=[/dnsaddr/testnet.ethswarm.org]
## cause the node to always accept incoming connections
# BEE_BOOTNODE_MODE=false
## enable clef signer
BEE_CLEF_SIGNER_ENABLE=true
## clef signer endpoint
# BEE_CLEF_SIGNER_ENDPOINT=
## config file (default is /home/<user>/.bee.yaml)
# BEE_CONFIG=/home/bee/.bee.yaml
## origins with CORS headers enabled
Expand Down

0 comments on commit 551d16d

Please sign in to comment.