-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathdocker-compose.mainnet.yml
More file actions
105 lines (96 loc) · 3.21 KB
/
Copy pathdocker-compose.mainnet.yml
File metadata and controls
105 lines (96 loc) · 3.21 KB
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
98
99
100
101
102
103
104
105
services:
snapchain:
image: farcasterxyz/snapchain:latest
pull_policy: always
# build: # For testing
# context: .
# dockerfile: Dockerfile
init: true # Auto-reap zombie processes and forward process signals
environment:
RUST_BACKTRACE: "full"
entrypoint:
- "/bin/bash"
- "-c"
- |
#!/bin/bash
set -euo pipefail
cat > config.toml <<EOF
rpc_address="0.0.0.0:3383"
http_address="0.0.0.0:3381"
rocksdb_dir=".rocks"
fc_network="Mainnet"
read_node = true
[statsd]
prefix="snapchain"
addr="statsd:8125"
use_tags=true
[gossip]
address="/ip4/0.0.0.0/udp/3382/quic-v1"
bootstrap_peers = "/ip4/54.236.164.51/udp/3382/quic-v1, /ip4/54.87.204.167/udp/3382/quic-v1, /ip4/44.197.255.20/udp/3382/quic-v1, /ip4/54.157.62.17/udp/3382/quic-v1, /ip4/34.195.157.114/udp/3382/quic-v1, /ip4/107.20.169.236/udp/3382/quic-v1, /ip4/34.4.32.36/udp/3382/quic-v1, /ip4/35.157.151.56/udp/3382/quic-v1, /ip4/108.132.114.186/udp/3382/quic-v1"
[consensus]
shard_ids = [1,2]
num_shards = 2
[snapshot]
endpoint_url = "https://e1f9f185c6e63471dd39f96abd3413c4.r2.cloudflarestorage.com"
load_db_from_snapshot=true
EOF
# Append validator sets from the dedicated validators.toml file.
# See validators.toml for the full history of validator changes and operator details.
cat /app/validators.toml >> config.toml
exec $0 $@ # Now run the original command
command: [ "./snapchain", "--config-path", "config.toml" ]
restart: always
ports:
- "3381:3381/tcp"
- "3382:3382/udp"
- "3383:3383/tcp"
volumes:
- .rocks:/app/.rocks
- .rocks.snapshot:/app/.rocks.snapshot
- ./validators.toml:/app/validators.toml:ro
networks:
- snapchain
ulimits:
nofile:
soft: 65535
hard: 65535
# 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:
- snapchain
# 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:
- snapchain
networks:
snapchain:
driver: bridge