make docker compose the recommended way

This commit is contained in:
LordGhostX 2024-02-07 01:25:35 +01:00
parent 04626a00c6
commit c17b68ad4a
No known key found for this signature in database
GPG Key ID: 520CC5DC4F94FCC7
2 changed files with 18 additions and 12 deletions

View File

@ -28,7 +28,7 @@ cd nwaku-compose
## Configure the setup
Docker Compose [reads the ./.env file](https://docs.docker.com/compose/environment-variables/set-environment-variables/#additional-information-3) from the filesystem. You can use `.env.example` as a template to provide the values mentioned above. The recommended process for working with `.env` files is to duplicate `.env.example`, rename it as `.env`, and then make the necessary value edits.
Docker Compose [reads the ./.env file](https://docs.docker.com/compose/environment-variables/set-environment-variables/#additional-information-3) from the filesystem. You can use `.env.example` as a template to provide the above values. The recommended process for working with `.env` files is to duplicate `.env.example`, rename it as `.env`, and then make the necessary value edits.
```shell
cp .env.example .env
@ -36,12 +36,12 @@ ${EDITOR} .env
```
:::caution
Ensure that you do **NOT** include any secrets in the `.env.example` file, as it could accidentally end up being shared in the Git repository.
Ensure that you do **NOT** include any secrets in the `.env.example` file, as it could accidentally be shared in the Git repository.
:::
## Register RLN membership
## Register for RLN membership
The RLN membership is your access key to The Waku Network. Its registration is done on-chain and allows your `nwaku` node to send messages decentralised and privately, respecting some [rate limits](https://rfc.vac.dev/spec/64/#rate-limit-exceeded). Messages that exceed the rate limit won't be relayed by other peers.
The RLN membership is your access key to The Waku Network. Its registration is done on-chain, allowing your `nwaku` node to send messages decentralised and privately, respecting some [rate limits](https://rfc.vac.dev/spec/64/#rate-limit-exceeded). Other peers won't relay messages that exceed the rate limit.
This command registers your membership and saves it in the `keystore/keystore.json` file:
@ -63,7 +63,7 @@ docker-compose up -d
## Interact with the node
Visit <http://localhost:3000/d/yns_4vFVk/nwaku-monitoring> to view your node metrics in real-time.
Visit <http://localhost:3000/d/yns_4vFVk/nwaku-monitoring> to view your node metrics in real time.
![nwaku compose dashboard](/img/nwaku-compose-dashboard.png)

View File

@ -13,7 +13,18 @@ We recommend running a `nwaku` node with at least 2GB of RAM, especially if you
## Get the node binary
To run a node, you must have the `nwaku` binary. Nwaku provides multiple options for acquiring the node binary:
To run a node, you must have the `nwaku` binary. Nwaku provides multiple options for running a node:
#### Run nwaku in Docker (recommended)
| | Description | Documentation |
| - | - | - |
| Docker Compose | Run a `nwaku` node with Docker Compose | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) |
| Docker Container | Run a `nwaku` node in a Docker Container | [Run Nwaku in a Docker Container](/guides/nwaku/run-docker) |
:::tip
We recommend [using Docker Compose](/guides/nwaku/run-docker-compose) to run a node because it's the simplest and fastest way to configure and run one.
:::
#### Download the binary
@ -24,14 +35,9 @@ To run a node, you must have the `nwaku` binary. Nwaku provides multiple options
#### Build the binary
You can build the node binary directly from the [nwaku source code](https://github.com/waku-org/nwaku). Have a look at the [Build Nwaku from Source](/guides/nwaku/build-source) guide to learn more.
#### Run nwaku in Docker
| | Description | Documentation |
| - | - | - |
| Docker Container | Run a `nwaku` node in a Docker Container | [Run Nwaku in a Docker Container](/guides/nwaku/run-docker) |
| Docker Compose | Run a `nwaku` node with Docker Compose | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) |
| Build from Source | Build the node from the [nwaku source code](https://github.com/waku-org/nwaku) | [Build Nwaku from Source](/guides/nwaku/build-source) |
:::tip
You can run the `nwaku` binaries and Docker images on cloud service providers like [Google Cloud](https://cloud.google.com/), [Microsoft Azure](https://azure.microsoft.com/), [Amazon Web Services](https://aws.amazon.com/), and [DigitalOcean](https://www.digitalocean.com/).