Created
May 7, 2024 22:51
-
-
Save gosseti/18326ec2de22abb4c9dc97bd662b706e to your computer and use it in GitHub Desktop.
docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
version: '3.9' | |
services: | |
hubble: | |
image: farcasterxyz/hubble:latest | |
pull_policy: always | |
restart: always | |
command: ["npx", "pm2-runtime", "start", "pm2.config.cjs"] | |
mem_reservation: 16G | |
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} | |
--rpc-subscribe-per-ip-limit ${RPC_SUBSCRIBE_PER_IP_LIMIT:-4} | |
-b ${BOOTSTRAP_NODE:-/dns/nemes.farcaster.xyz/tcp/2282} | |
--statsd-metrics-server $STATSD_METRICS_SERVER | |
--hub-operator-fid ${HUB_OPERATOR_FID:-0} | |
--opt-out-diagnostics ${HUB_OPT_OUT_DIAGNOSTICS:-false} | |
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 | |
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 | |
# 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: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment