Skip to content

Commit

Permalink
Merge branch 'main' into issue-620-fix-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Aug 28, 2024
2 parents ed746c9 + fc89cfe commit 41d91be
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ We recommend the following minimum requirements, although you may be be able to

## Option 1: Running Ocean Nodes in Docker (recommended)

[This readme](deployment/README.md) is the recommended way to host a node and be eligible for incentives.
The other options are more recommended towards deleveopers that want to tinker.
[This readme](docs/dockerDeployment.md) is the recommended way to host a node and be eligible for incentives.
The other options are more recommended towards developers that want to tinker.

## Option 2: Running local build of Ocean Nodes in Docker

Build and run the node using Docker:
Run the following script to deploy node:

```bash
docker build -t ocean-node:mybuild . # Build the Docker image
# Make sure you include 0x at the start of the private key
docker run -e PRIVATE_KEY=0x_your_private_key_here ocean-node:mybuild # Start container
scripts/ocean-node-quickstart.sh
# OR
npm run quickstart
```

This command will run you through the process of setting up the environmental variables for your node.

## Option 3: Running Ocean Nodes with PM2

PM2 is a process manager that makes it easy to manage and monitor your Node.js applications.
Expand All @@ -40,13 +42,29 @@ PM2 is a process manager that makes it easy to manage and monitor your Node.js a
npm install -g pm2
```

2. Start the Ocean Node with PM2
2. Setup the environmental variables

Either use the script:

```
npm run envSetup
```

or setup the required environment variables manually:

```bash
export PRIVATE_KEY="0x_your_private_key_here"
```

The `PRIVATE_KEY` is the only mandatory environmental variable, you must include the `0x` at the front of your private key. Additional configurations can be set as needed. For all available configurations, refer to the [Environment Variables](docs/env.md) documentation.

3. Quick start the Ocean Node with PM2

```bash
pm2 start npm --name "ocean-node" -- run start
```

3. Monitor and Manage the Node
4. Monitor and Manage the Node

You can use the following PM2 commands to manage your Ocean Node:

Expand Down Expand Up @@ -119,3 +137,4 @@ Your node is now running, the dashboard will be available at `http://localhost:8
- [Network Configuration](docs/networking.md)
- [Logging & accessing logs](docs/networking.md)
- [Dashboard: Local development](dashboard/README.md)
- [Docker Deployment Guide](docs/dockerDeployment.md)
4 changes: 3 additions & 1 deletion deployment/README.md → docs/dockerDeployment.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Docker Deployment Guide

This guide is intended to provide quick steps for starting an **Ocean Node** using Docker Engine and Docker Compose plugin.

Note: For installing each of these prerequisites, a good starting point is the official documentation: [Install Docker Engine](https://docs.docker.com/engine/install/) and [Overview of installing Docker Compose](https://docs.docker.com/compose/install/)
Expand All @@ -9,7 +11,7 @@ a) download the script `ocean-node-quickstart.sh` from the current directory
b) run the script

```shell
bash ocean-node-quickstart.sh
bash scripts/ocean-node-quickstart.sh
```

c) provide the necessary information interactively (example)
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"build": "npm run clean && npm run check-changes && npm run build:tsc",
"build:no-dashboard": "npm run clean && npm run build:tsc",
"build:tsc": "tsc --sourceMap",
"quickstart": "bash scripts/ocean-node-quickstart.sh",
"setupEnv": "bash -c './src/helpers/scripts/setupNodeEnv.sh && source .env'",
"build-tests:tsc": "tsc --sourceMap --sourceRoot ./src/test && cp ./src/test/.env.test ./dist/test",
"build:dashboard": "cd dashboard && npm install --maxsockets 1 && NODE_ENV=production npx next build",
"check-changes": "node scripts/dashboardChanges.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/dashboard.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c870a78421b1c4c5c9870fa7bec7947f64cb8574f166211814487c34be6cce34
c870a78421b1c4c5c9870fa7bec7947f64cb8574f166211814487c34be6cce34
File renamed without changes.

0 comments on commit 41d91be

Please sign in to comment.