Files
hub-monorepo/docker-compose-multinode.yml
Aditi Srinivasan fbf575bae0 fix: updated multinode docker compose (#2065)
## Motivation

I tried running this multinode setup and ran into a couple issues with
the config. This PR fixes them.

## Change Summary

I just added arguments for the optimism rpc url (required) and removed
--gossip-metrics-enabled which doesn't exist anymore.

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [ ] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [x] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.
- [x] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)
2024-06-17 10:41:15 -07:00

80 lines
1.8 KiB
YAML

# To start two peered hubs locally, run:
#
# `docker compose -f docker-compose-multinode.yml run yarn --cwd=apps/hubble identity create -N 2`
#
# Set $TEST_HUB1_ID and $TEST_HUB2_ID in your .env file to the paths generated by the previous command. Then run:
#
# `docker compose -f docker-compose-multinode.yml up`
#
# This is useful when testing protocol changes locally.
version: '3.9'
services:
hubble1:
build:
context: .
dockerfile: Dockerfile.hubble
ports:
- '2282:2282'
- '2283:2283'
command:
[
"node",
"build/cli.js",
"start",
"--gossip-port",
"2282",
"--rpc-port",
"2283",
"--eth-mainnet-rpc-url",
"$ETH_MAINNET_RPC_URL",
"--l2-rpc-url",
"$OPTIMISM_L2_RPC_URL",
"--network",
"3",
"--db-name",
"hubble1",
"--process-file-prefix",
"hubble1",
"--id",
"$TEST_HUB1_ID",
]
volumes:
- ./apps/hubble/.hub:/home/node/app/apps/hubble/.hub
- ./apps/hubble/.rocks:/home/node/app/apps/hubble/.rocks
hubble2:
build:
context: .
dockerfile: Dockerfile.hubble
ports:
- '2284:2284'
- '2285:2285'
command:
[
"node",
"build/cli.js",
"start",
"--gossip-port",
"2284",
"--rpc-port",
"2285",
"--eth-mainnet-rpc-url",
"$ETH_MAINNET_RPC_URL",
"--l2-rpc-url",
"$OPTIMISM_L2_RPC_URL",
"--network",
"3",
"-b",
"/dns/hubble1/tcp/2282",
"--db-name",
"hubble2",
"--process-file-prefix",
"hubble2",
"--id",
"$TEST_HUB2_ID",
]
volumes:
- ./apps/hubble/.hub:/home/node/app/apps/hubble/.hub
- ./apps/hubble/.rocks:/home/node/app/apps/hubble/.rocks