forked from farcasterxyz/hub-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (93 loc) · 3.36 KB
/
docker-compose.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# A working Docker Compose configuration file that starts a working hub.
#
# See https://www.thehubble.xyz/intro/install.html#installing-hubble for full
# instructions.
#
# WARNING: Running `docker compose up` from the latest commit on the main
# branch may not work. Make sure to check out the latest tagged release first:
#
# git fetch --tags --force && git checkout @latest && docker compose up
services:
hubble:
image: farcasterxyz/hubble:latest
pull_policy: always
restart: always
command: ["npx", "pm2-runtime", "start", "pm2.config.cjs"]
mem_reservation: 16G
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:2281/v1/info"]
interval: 30s
timeout: 5s
retries: 3
start_period: 1m
# in case you have an identity file already you may want to use IDENTITY_B64 to pass it as base64 encoded string to Hubble as env variable
environment:
CATCHUP_SYNC_WITH_SNAPSHOT: "${CATCHUP_SYNC_WITH_SNAPSHOT:-true}"
NODE_OPTIONS: "--no-warnings --max-old-space-size=8192"
HUBBLE_ARGS: >-
start
--ip 0.0.0.0
--gossip-port ${GOSSIP_PORT:-2282}
--rpc-port ${RPC_PORT:-2283}
--eth-mainnet-rpc-url $ETH_MAINNET_RPC_URL
--l2-rpc-url $OPTIMISM_L2_RPC_URL
--network ${FC_NETWORK_ID:-1}
--hub-operator-fid ${HUB_OPERATOR_FID:-0}
--rpc-subscribe-per-ip-limit ${RPC_SUBSCRIBE_PER_IP_LIMIT:-4}
-b ${BOOTSTRAP_NODE:-/dns/hoyt.farcaster.xyz/tcp/2282}
--statsd-metrics-server $STATSD_METRICS_SERVER
--opt-out-diagnostics ${HUB_OPT_OUT_DIAGNOSTICS:-false}
${HUB_OPTIONS:-}
ports:
- '${HTTPAPI_PORT:-2281}:${HTTPAPI_PORT:-2281}' # HTTP API. You can set HTTP_PORT in .env
- '${GOSSIP_PORT:-2282}:${GOSSIP_PORT:-2282}' # Gossip. You can set GOSSIP_PORT in .env
- '${RPC_PORT:-2283}:${RPC_PORT:-2283}' # RPC. You can set RPC_PORT in .env
volumes:
- ./.hub:/home/node/app/apps/hubble/.hub
- ./.rocks:/home/node/app/apps/hubble/.rocks
networks:
- my-network
logging:
driver: "json-file"
options:
max-size: "1g"
max-file: "2"
# Start this if you want perf metrics for your hubble node. Remember to start `grafana` as well.
statsd:
image: graphiteapp/graphite-statsd:1.1.10-5
restart: unless-stopped
healthcheck:
test: ["CMD", "nc", "-zv", "localhost", "8126"]
interval: 30s
timeout: 5s
retries: 3
start_period: 1m
ports:
# - '80:80' # Graphite web
# - '2003:2003' # Carbon line receiver
# - '2004:2004' # Carbon pickle receiver
# - '7002:7002' # Carbon cache query
- '${STATSD_PUBLISH:-8125}:8125/udp' # StatsD
- '${STATSD_ADMIN_PUBLISH:-8126}:8126' # StatsD admin
networks:
- my-network
# Start this if you want to see perf metrics for your hubble node. Remember to start `statsd` as well.
grafana:
image: grafana/grafana:10.0.3
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "localhost:3000/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 1m
# Mount the grafana config file
volumes:
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ./grafana/data:/var/lib/grafana # Persistent Grafana data
ports:
- '3000:3000' # Grafana web
networks:
- my-network
networks:
my-network: