diff --git a/.cspell.json b/.cspell.json index e9dd786..ab767a7 100644 --- a/.cspell.json +++ b/.cspell.json @@ -43,7 +43,8 @@ "autoplay", "classwide", "devel", - "statusteam" + "statusteam", + "myaddr" ], "flagWords": [], "ignorePaths": [ diff --git a/docs/guides/nodes-and-sdks.md b/docs/guides/nodes-and-sdks.md index 2bdf708..a40cdd5 100644 --- a/docs/guides/nodes-and-sdks.md +++ b/docs/guides/nodes-and-sdks.md @@ -42,6 +42,7 @@ Waku provides integrations tailored for mobile applications, enabling Waku to ru | | Description | Documentation | | - | - | - | +| JSON-RPC API | `JSON-RPC` API interface provided by `nwaku` and `go-waku` to interact with the Waku Network | | | [@waku/react](https://www.npmjs.com/package/@waku/react) | React components and UI adapters designed for seamless integration with `js-waku` | | | [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) | Starter kit to bootstrap your next `js-waku` project from various example templates | | -| JSON-RPC API | `JSON-RPC` API interface provided by `nwaku` and `go-waku` to interact with the Waku Network | | \ No newline at end of file +| [nwaku-compose](https://github.com/alrevuelta/nwaku-compose) | Pre-configured `docker-compose` setup for running and monitoring a `nwaku` node using Prometheus and Grafana. | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) | \ No newline at end of file diff --git a/docs/guides/nwaku/build-from-source.md b/docs/guides/nwaku/build-from-source.md index 43adfb7..e385ca7 100644 --- a/docs/guides/nwaku/build-from-source.md +++ b/docs/guides/nwaku/build-from-source.md @@ -2,17 +2,13 @@ title: Build Nwaku from Source --- -This guide provides detailed steps to build a nwaku node from the source to access the latest development version or a specific commit of nwaku. If you prefer a more stable version, [download a pre-compiled binary](https://github.com/waku-org/nwaku/tags) instead. - -:::info -Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental. -::: +This guide provides detailed steps to build a `nwaku` node from the source to access the latest development version or a specific commit of nwaku. If you prefer a more stable version, [download a pre-compiled binary](https://github.com/waku-org/nwaku/tags) instead. ## Prerequisites - 2GB of RAM - [Git](https://git-scm.com/) or [GitHub Desktop](https://desktop.github.com/) -- [Nim](https://nim-lang.org/) installed on your system +- [Nim](https://nim-lang.org/install.html) installed on your system ## Install Dependencies @@ -20,7 +16,7 @@ To clone and build nwaku, you will need the standard developer tools, including #### Linux -To install the dependencies on common Linux distributions, run the following: +To install the dependencies on common Linux distributions, use: ```mdx-code-block import Tabs from '@theme/Tabs'; @@ -45,7 +41,7 @@ dnf install @development-tools ```bash -# using your favorite AUR helper +# Using your favorite AUR helper [AUR HELPER] -S base-devel ``` @@ -54,7 +50,7 @@ dnf install @development-tools #### macOS -If you use [Homebrew](https://brew.sh/) to manage packages, run the following: +If you use [Homebrew](https://brew.sh/) to manage packages, use: ```bash brew install cmake @@ -75,7 +71,7 @@ You can use `git tag -l` to check specific version tags. ## Build the Binary -To build the nwaku binary, run the following: +To build the `nwaku` binary, use: ```bash make wakunode2 @@ -89,21 +85,26 @@ make update wakunode2 ## Run the Binary -Nwaku will create the `wakunode2` binary in the `./build/` directory. +Nwaku will create the `wakunode2` binary in the `./build/` directory. ```bash +# Run with default configuration ./build/wakunode2 + +# See available command line options +./build/wakunode2 --help ``` To learn more about running nwaku, please refer to: - [Run a Nwaku Node](/guides/run-nwaku-node#run-the-node) - [Run Nwaku in Docker Container](/guides/nwaku/run-docker) +- [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) - [Run Nwaku on DigitalOcean Droplet](https://github.com/waku-org/nwaku/blob/master/docs/operators/droplet-quickstart.md) ## Run Test Suite -To run the tests for both `Waku v1` and `Waku v2`, run the following: +To run the tests for both `Waku v1` and `Waku v2`, use: ```bash make test diff --git a/docs/guides/nwaku/run-docker-compose.md b/docs/guides/nwaku/run-docker-compose.md new file mode 100644 index 0000000..7ecf902 --- /dev/null +++ b/docs/guides/nwaku/run-docker-compose.md @@ -0,0 +1,41 @@ +--- +title: Run Nwaku with Docker Compose +--- + +`nwaku-compose` is a ready-to-use `docker-compose` setup that runs a nwaku node and monitors it with already configured [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) instances. This guide provides detailed steps to build, run, and monitor a `nwaku` node with [nwaku-compose](https://github.com/alrevuelta/nwaku-compose). + +## Prerequisites + +- [Git](https://git-scm.com/) or [GitHub Desktop](https://desktop.github.com/) +- [Docker](https://docs.docker.com/engine/install/) +- [Docker Compose](https://docs.docker.com/compose/install/) + +## Clone the Repository + +```bash +git clone https://github.com/alrevuelta/nwaku-compose +cd nwaku-compose +``` + +## Configure the Setup + +Modify the `docker-compose.yml` file to customize your node's configuration, including the Docker image and [nwaku arguments](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure.md). Please visit [statusteam/nim-waku/tags](https://hub.docker.com/r/statusteam/nim-waku/tags) for images of specific `nwaku` releases. + +## Run Docker Compose + +To export your public IP (`MY_EXT_IP`) and run `nwaku-compose`, use: + +```bash +export MY_EXT_IP=$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}') +docker-compose up -d +``` + +## Monitor the Node + +Visit to view your node metrics in real-time. + +![nwaku compose dashboard](/img/nwaku-compose-dashboard.png) + +:::tip +To access Grafana from outside your machine, remove `127.0.0.1` and open the port. Consider setting up a password for Grafana to ensure security. +::: \ No newline at end of file diff --git a/docs/guides/nwaku/run-docker.md b/docs/guides/nwaku/run-docker.md index 64f8812..e9f10dc 100644 --- a/docs/guides/nwaku/run-docker.md +++ b/docs/guides/nwaku/run-docker.md @@ -2,7 +2,7 @@ title: Run Nwaku in Docker Container --- -This guide provides detailed steps to build and run a nwaku node in a Docker container. +This guide provides detailed steps to build and run a `nwaku` node in a Docker container. If you prefer a pre-configured setup that includes a monitoring dashboard, see the [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) guide. ## Prerequisites @@ -17,7 +17,7 @@ sudo sh get-docker.sh The Nwaku Docker images are available on the Docker Hub public registry under the [statusteam/nim-waku](https://hub.docker.com/r/statusteam/nim-waku) repository. Please visit [statusteam/nim-waku/tags](https://hub.docker.com/r/statusteam/nim-waku/tags) for images of specific releases. -To pull the latest image, run the following: +To pull the latest image, use: ```bash docker pull statusteam/nim-waku @@ -26,14 +26,20 @@ docker pull statusteam/nim-waku You can also build the Docker image locally using: ```bash +# Clone the repository git clone --recurse-submodules https://github.com/waku-org/nwaku cd nwaku + +# Build image using make +make docker-image + +# Build image using docker build docker build -t statusteam/nim-waku:latest . ``` ## Run Docker Container -To run nwaku in a new Docker container, run the following: +To run `nwaku` in a new Docker container, use: ```bash docker run [OPTIONS] [IMAGE] [ARG...] @@ -41,18 +47,14 @@ docker run [OPTIONS] [IMAGE] [ARG...] - `OPTIONS` are your selected [Docker options](https://docs.docker.com/engine/reference/commandline/run/#options) - `IMAGE` is the image and tag you pulled from the registry or built locally -- `ARG...` is the list of nwaku arguments for your [chosen nwaku configuration](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure.md) +- `ARG...` is the list of `nwaku` arguments for your [chosen nwaku configuration](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure.md) :::tip We recommend using explicit port mappings (`-p`) when exposing ports accessible from outside the host (libp2p listening ports, discovery, HTTP server). ::: -To run nwaku in a Docker container using the [default configuration](/guides/run-nwaku-node#run-the-node), run the following: +To run `nwaku` in a Docker container using the [default configuration](/guides/run-nwaku-node#run-the-node), use: ```bash docker run -i -t -p 60000:60000 -p 8545:8545 statusteam/nim-waku -``` - -:::tip -The `docker run` command automatically pulls the specified image from Docker Hub if it is not already available locally. -::: \ No newline at end of file +``` \ No newline at end of file diff --git a/docs/guides/run-nwaku-node.md b/docs/guides/run-nwaku-node.md index 7dfd1ee..bf64fdf 100644 --- a/docs/guides/run-nwaku-node.md +++ b/docs/guides/run-nwaku-node.md @@ -6,20 +6,24 @@ Nwaku (formerly `nim-waku`) is a lightweight and robust Nim client for running a This guide provides detailed steps to build, configure, and connect a `nwaku` node to the Waku Network. It also covers using existing tools to monitor and maintain the node. +:::info +Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental. +::: + ## Build the Node -Before running a nwaku node, it is necessary to build it. Nwaku provides multiple options for building a node: +Before running a `nwaku` node, it is necessary to build it. Nwaku provides multiple options for building a node: | | Description | Documentation | | - | - | - | -| Source Code | Build a `nwaku` node directly from the source code | [Build Nwaku from Source](/guides/nwaku/build-from-source) | | Precompiled Binary | Download a precompiled binary of the `nwaku` node | [Download Nwaku Binary](https://github.com/waku-org/nwaku/tags) | -| Nightly Release | Try out the latest `nwaku` updates without compiling the binaries | [Download Nightly Release](https://github.com/waku-org/nwaku/releases/tag/nightly) | +| Build Source | Build a `nwaku` node directly from the source code | [Build Nwaku from Source](/guides/nwaku/build-from-source) | | Docker Container | Build and run a `nwaku` node in a Docker Container | [Run Nwaku in Docker Container](/guides/nwaku/run-docker) | +| Docker Compose | Build and run a `nwaku` node with Docker Compose | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) | | DigitalOcean Droplet | Build and run a `nwaku` node on a DigitalOcean Droplet | [Run Nwaku on DigitalOcean Droplet](https://github.com/waku-org/nwaku/blob/master/docs/operators/droplet-quickstart.md) | -:::info -Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental. +:::tip +If you want to try the latest `nwaku` updates without compiling the binaries, [download the nightly release](https://github.com/waku-org/nwaku/releases/tag/nightly). ::: ## Run the Node diff --git a/sidebars.js b/sidebars.js index db507ac..e3c186d 100644 --- a/sidebars.js +++ b/sidebars.js @@ -63,6 +63,7 @@ const sidebars = { items: [ "guides/nwaku/build-from-source", "guides/nwaku/run-docker", + "guides/nwaku/run-docker-compose", ] }, ], diff --git a/static/img/nwaku-compose-dashboard.png b/static/img/nwaku-compose-dashboard.png new file mode 100644 index 0000000..ce852d5 Binary files /dev/null and b/static/img/nwaku-compose-dashboard.png differ diff --git a/static/img/railgun-logo.png b/static/img/railgun-logo.png deleted file mode 100644 index 62ed163..0000000 Binary files a/static/img/railgun-logo.png and /dev/null differ diff --git a/static/img/status-logo.svg b/static/img/status-logo.svg deleted file mode 100644 index 799e00e..0000000 --- a/static/img/status-logo.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/static/img/the-graph-logo.svg b/static/img/the-graph-logo.svg deleted file mode 100644 index b6ed0c5..0000000 --- a/static/img/the-graph-logo.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/static/img/xmtp-logo.svg b/static/img/xmtp-logo.svg deleted file mode 100644 index 9ce73b7..0000000 --- a/static/img/xmtp-logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -