-
Notifications
You must be signed in to change notification settings - Fork 401
/
docker-compose-multinode.yml
79 lines (77 loc) · 1.8 KB
/
docker-compose-multinode.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# 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