-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathomni.yml
177 lines (171 loc) · 6.09 KB
/
omni.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
x-logging: &logging
logging:
driver: json-file
options:
max-size: 20m
max-file: "3"
services:
halo:
container_name: halo
build:
context: ./halo
dockerfile: ${HALO_DOCKERFILE}
args:
- DOCKER_TAG=${HALO_DOCKER_TAG:-stable}
- DOCKER_REPO=${HALO_DOCKER_REPO:-ethereum/client-go}
image: halo:local
pull_policy: never
user: halo
restart: unless-stopped
stop_grace_period: 5m
environment:
- JWT_SECRET=${JWT_SECRET:-}
- CL_EXTRAS=${CL_EXTRAS:-}
- NETWORK=${NETWORK}
- MONIKER=${MONIKER}
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- CL_P2P_PORT=${CL_P2P_PORT:-26656}
- CL_RPC_PORT=${CL_RPC_PORT:-26657}
- HOST_IP=${HOST_IP}
ports:
- ${CL_P2P_PORT:-26656}:${CL_P2P_PORT:-26656}/tcp # CometBFT Consensus P2P
- ${CL_RPC_PORT:-26657}:${CL_RPC_PORT:-26657}/tcp # CometBFT Consensus RPC
volumes:
- halo-data:/halo
- jwtsecret:/geth/jwtsecret
- ./config/priv_validator_key.json:/halo/config/priv_validator_key.json
- ./config/priv_validator_state.json:/halo/data/priv_validator_state.json
- ./config/voter_state.json:/halo/data/voter_state.json
entrypoint:
- docker-entrypoint.sh
- cosmovisor
- run
- run
labels:
- traefik.enable=true
- traefik.http.routers.${CL_HOST}.service=${CL_HOST}
- traefik.http.routers.${CL_HOST}.entrypoints=websecure
- traefik.http.routers.${CL_HOST}.rule=Host(`${CL_HOST}.${DOMAIN}`)
- traefik.http.routers.${CL_HOST}.tls.certresolver=letsencrypt
- traefik.http.routers.${CL_HOST}lb.service=${CL_HOST}
- traefik.http.routers.${CL_HOST}lb.entrypoints=websecure
- traefik.http.routers.${CL_HOST}lb.rule=Host(`${EL_LB}.${DOMAIN}`)
- traefik.http.routers.${CL_HOST}lb.tls.certresolver=letsencrypt
- traefik.http.services.${CL_HOST}.loadbalancer.server.port=${CL_RPC_PORT}
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=6060
- metrics.instance=halo
- metrics.network=${NETWORK}
geth:
container_name: omni_evm
build:
context: ./geth
dockerfile: ${GETH_DOCKERFILE}
args:
- DOCKER_TAG=${GETH_DOCKER_TAG:-stable}
- DOCKER_REPO=${GETH_DOCKER_REPO:-ethereum/client-go}
image: geth:local
pull_policy: never
user: geth
restart: unless-stopped
stop_grace_period: 5m
environment:
- JWT_SECRET=${JWT_SECRET:-}
- LOG_LEVEL=${LOG_LEVEL:-info}
- EL_EXTRAS=${EL_EXTRAS:-}
- NETWORK=${NETWORK}
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
- ANCIENT_DIR=${ANCIENT_DIR:-}
volumes:
- geth-data:/var/lib/geth
- jwtsecret:/var/lib/geth/ee-secret
entrypoint:
- docker-entrypoint.sh
- geth
- --config
- /home/geth/config.toml
- --http
- --http.addr
- 0.0.0.0
- --http.vhosts=*
- --http.corsdomain=*
- --port
- ${EL_P2P_PORT:-30303}
- --http.port
- ${EL_RPC_PORT:-8545}
- --ws
- --ws.addr
- 0.0.0.0
- --ws.port
- ${EL_WS_PORT:-8546}
- --ws.origins=*
- --metrics
- --pprof
- --pprof.addr
- 0.0.0.0
- --authrpc.jwtsecret
- /var/lib/geth/ee-secret/jwtsecret
- --authrpc.addr
- 0.0.0.0
- --authrpc.port
- ${EE_PORT:-8551}
- --authrpc.vhosts=*
- --maxpeers
- ${EL_MAX_PEER_COUNT:-50}
ports:
- ${EE_PORT:-8551}:${EE_PORT:-8551} # Auth-RPC (used by halo)
- ${EL_RPC_PORT:-8545}:${EL_RPC_PORT:-8545} # JSON-RCP
- ${EL_WS_PORT:-8546}:${EL_WS_PORT:-8546} # Websocket-RPC
- ${EL_P2P_PORT:-30303}:${EL_P2P_PORT:-30303} # Execution P2P
- ${EL_P2P_PORT:-30303}:${EL_P2P_PORT:-30303}/udp # Execution P2P Discovery
labels:
- traefik.enable=true
- traefik.http.routers.${EL_HOST:-el}.service=${EL_HOST:-el}
- traefik.http.routers.${EL_HOST:-el}.entrypoints=websecure
- traefik.http.routers.${EL_HOST:-el}.rule=Host(`${EL_HOST:-el}.${DOMAIN}`)
- traefik.http.routers.${EL_HOST:-el}.tls.certresolver=letsencrypt
- traefik.http.routers.${EL_HOST:-el}lb.service=${EL_HOST:-el}
- traefik.http.routers.${EL_HOST:-el}lb.entrypoints=websecure
- traefik.http.routers.${EL_HOST:-el}lb.rule=Host(`${EL_LB}.${DOMAIN}`)
- traefik.http.routers.${EL_HOST:-el}lb.tls.certresolver=letsencrypt
- traefik.http.services.${EL_HOST:-el}.loadbalancer.server.port=${EL_RPC_PORT:-8545}
- traefik.http.routers.${EL_WS_HOST:-elws}.service=${EL_WS_HOST:-elws}
- traefik.http.routers.${EL_WS_HOST:-elws}.entrypoints=websecure
- traefik.http.routers.${EL_WS_HOST:-elws}.rule=Host(`${EL_WS_HOST:-elws}.${DOMAIN}`)
- traefik.http.routers.${EL_WS_HOST:-elws}.tls.certresolver=letsencrypt
- traefik.http.routers.${EL_WS_HOST:-elws}lb.service=${EL_WS_HOST:-elws}
- traefik.http.routers.${EL_WS_HOST:-elws}lb.entrypoints=websecure
- traefik.http.routers.${EL_WS_HOST:-elws}lb.rule=Host(`${EL_WS_LB:-elws-lb}.${DOMAIN}`)
- traefik.http.routers.${EL_WS_HOST:-elws}lb.tls.certresolver=letsencrypt
- traefik.http.services.${EL_WS_HOST:-elws}.loadbalancer.server.port=${EL_WS_PORT:-8546}
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=6060
- metrics.instance=geth
- metrics.network=${NETWORK}
<<: *logging
create-validator-keys:
profiles: ["tools"]
build:
context: ./omni-cli
dockerfile: Dockerfile.binary
image: omni:local
pull_policy: never
user: root
volumes:
- ./config:/data/config:rw
entrypoint: ["/bin/bash","-c"]
environment:
- NETWORK=${NETWORK:-}
command:
- |
omni operator create-consensus-key --home /data/${NETWORK}/halo
cp /data/${NETWORK}/halo/config/priv_validator_key.json /data/config/
cp /data/${NETWORK}/halo/data/priv_validator_state.json /data/config/
cp /data/${NETWORK}/halo/data/voter_state.json /data/config/
chown -R omni:omni /data/config/*
volumes:
halo-data:
geth-data:
jwtsecret: