-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcompose.blockscout.yaml
More file actions
206 lines (195 loc) · 8.17 KB
/
Copy pathcompose.blockscout.yaml
File metadata and controls
206 lines (195 loc) · 8.17 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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: fabric-x-evm
# Blockscout block explorer.
#
# Requires the gateway to be running and healthy first:
# make start starts all three layers in the correct order
#
# Secrets are generated once in blockscout.env (make start handles this).
services:
db:
image: docker.io/library/postgres:18.3-alpine3.23
shm_size: 256m
restart: unless-stopped
container_name: db
command: postgres -c 'max_connections=200' -c
'client_connection_check_interval=60000'
environment:
POSTGRES_DB: blockscout
POSTGRES_USER: blockscout
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./data/blockscout:/var/lib/postgresql:U,Z
healthcheck:
test: ["CMD-SHELL", "pg_isready -U blockscout -d blockscout"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis-db:
image: docker.io/library/redis:alpine
container_name: redis-db
command: redis-server
restart: unless-stopped
backend:
image: ghcr.io/blockscout/blockscout:9.0.2
pull_policy: missing
restart: unless-stopped
stop_grace_period: 10s
container_name: backend
command: sh -c "bin/blockscout eval
\"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout
start"
depends_on:
db:
condition: service_healthy
redis-db:
condition: service_started
smart-contract-verifier:
condition: service_started
environment:
CHAIN_ID: "${CHAIN_ID:-4011}"
DATABASE_URL: postgresql://blockscout:${POSTGRES_PASSWORD}@db:5432/blockscout
ECTO_USE_SSL: "false"
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
ETHEREUM_JSONRPC_HTTP_URL: http://gateway:8545
ETHEREUM_JSONRPC_TRACE_URL: http://gateway:8545
INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE: opcode
INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: "true"
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: "true"
INDEXER_CATCHUP_BLOCKS_BATCH_SIZE: "5"
INDEXER_CATCHUP_BLOCKS_CONCURRENCY: "1"
INDEXER_DISABLE_USER_OPS_FETCHER: "true"
INDEXER_DISABLE_BLOCK_REWARD_FETCHER: "true"
INDEXER_DISABLE_TOKEN_INSTANCE_ERC_721_SANITIZE_FETCHER: "true"
INDEXER_DISABLE_TOKEN_INSTANCE_ERC_1155_SANITIZE_FETCHER: "true"
INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER: "true"
INDEXER_DISABLE_TOKEN_INSTANCE_REFETCH_FETCHER: "true"
INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER: "true"
INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER: "true"
DISABLE_MARKET: "true"
DISABLE_FILE_LOGGING: "true"
MICROSERVICE_SIG_PROVIDER_ENABLED: "true"
MICROSERVICE_SIG_PROVIDER_URL: http://sig-provider:8050/
MICROSERVICE_SC_VERIFIER_ENABLED: "true"
MICROSERVICE_SC_VERIFIER_URL: http://smart-contract-verifier:8050/
MICROSERVICE_SC_VERIFIER_TYPE: sc_verifier
healthcheck:
test: ["CMD-SHELL", "curl -fs http://localhost:4000/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
sig-provider:
image: ghcr.io/blockscout/sig-provider:v1.1.1
platform: linux/amd64
pull_policy: missing
restart: unless-stopped
container_name: sig-provider
# Verifies submitted Solidity source against deployed bytecode and enables the
# explorer's "Read/Write Contract" tabs.
smart-contract-verifier:
image: ghcr.io/blockscout/smart-contract-verifier:v1.10.3
platform: linux/amd64
pull_policy: missing
restart: unless-stopped
container_name: smart-contract-verifier
environment:
SMART_CONTRACT_VERIFIER__SERVER__HTTP__ADDR: "0.0.0.0:8050"
SMART_CONTRACT_VERIFIER__SOLIDITY__ENABLED: "true"
SMART_CONTRACT_VERIFIER__VYPER__ENABLED: "false"
SMART_CONTRACT_VERIFIER__SOURCIFY__ENABLED: "false"
SMART_CONTRACT_VERIFIER__METRICS__ENABLED: "false"
frontend:
image: ghcr.io/blockscout/frontend:v2.3.5
pull_policy: missing
restart: unless-stopped
container_name: frontend
depends_on:
backend:
condition: service_healthy
environment:
NEXT_PUBLIC_API_HOST: localhost
NEXT_PUBLIC_API_PORT: "8000"
NEXT_PUBLIC_API_PROTOCOL: http
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL: ws
NEXT_PUBLIC_APP_HOST: localhost
NEXT_PUBLIC_APP_PORT: "8000"
NEXT_PUBLIC_APP_PROTOCOL: http
NEXT_PUBLIC_NETWORK_ID: "${CHAIN_ID:-4011}"
NEXT_PUBLIC_NETWORK_NAME: Fabric-X EVM
NEXT_PUBLIC_NETWORK_SHORT_NAME: FxEVM
FAVICON_MASTER_URL: https://cdn.jsdelivr.net/gh/callback-io/allogo@main/public/logos/hyperledger/icon.svg
NEXT_PUBLIC_NETWORK_ICON: https://cdn.jsdelivr.net/gh/callback-io/allogo@main/public/logos/hyperledger/icon.svg
NEXT_PUBLIC_NETWORK_LOGO: https://cdn.jsdelivr.net/gh/callback-io/allogo@main/public/logos/hyperledger/icon.svg
NEXT_PUBLIC_NETWORK_RPC_URL: http://localhost:8545 # Used for "add to metamask".
NEXT_PUBLIC_NETWORK_CURRENCY_NAME: "Fabric-X Token"
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: "FAB"
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: "18"
NEXT_PUBLIC_IS_TESTNET: "true"
NEXT_PUBLIC_HOMEPAGE_CHARTS: "[]"
NEXT_PUBLIC_COLOR_PRIMARY: #00A3FF
NEXT_PUBLIC_COLOR_SECONDARY: #0F172A
NEXT_PUBLIC_HOMEPAGE_HERO_BANNER_CONFIG:
"{\"background\":[\"linear-gradient(13\
5deg, #0F172A 0%, #1E293B 50%, #0EA5E9 100%)\"]}"
NEXT_PUBLIC_FOOTER_LINKS:
"[{\"title\":\"Fabric-X\",\"links\":[{\"text\":\"fabr\
ic-x\",\"url\":\"https://www.github.com/hyperledger/fabric-x\"},{\"text\
\":\"fabric-x-evm\",\"url\":\"https://www.github.com/hyperledger/fabric\
-x-evm\"}]},{\"title\":\"LF Decentralized
Trust\",\"links\":[{\"text\":\"lfdecentralizedtrust.org\",\"url\":\"htt\
ps://www.lfdecentralizedtrust.org/\"}]}]"
NEXT_PUBLIC_VIEWS_TX_HIDDEN_FIELDS: '["value", "fee_currency",
"gas_price", "tx_fee", "gas_fees", "burnt_fees", "L1_status",
"batch"]'
NEXT_PUBLIC_GAS_TRACKER_ENABLED: "false"
NEXT_PUBLIC_HAS_USER_OPS: "false"
NEXT_PUBLIC_HAS_BEACON_CHAIN: "false"
NEXT_PUBLIC_MARKETPLACE_ENABLED: "false"
NEXT_PUBLIC_VIEWS_BLOCK_HIDDEN_FIELDS: '["burnt_fees","total_reward"]'
proxy:
image: docker.io/library/nginx:1.29.8
pull_policy: missing
container_name: proxy
restart: unless-stopped
depends_on:
- backend
- frontend
configs:
- source: nginx
target: /etc/nginx/conf.d/default.conf
ports:
- "127.0.0.1:8000:80"
configs:
nginx:
content: |
map $$http_upgrade $$connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_tokens off;
proxy_http_version 1.1;
error_page 502 @starting;
location @starting {
default_type text/html;
return 502 '<html><head><title>Starting up</title><style>body{margin:0;min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0F172A;font-family:sans-serif;color:#e2e8f0}.box{text-align:center}h1{color:#00A3FF;margin-bottom:.5rem}p{margin:.25rem 0;color:#94a3b8}button{margin-top:1.5rem;padding:.6rem 1.8rem;background:#00A3FF;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:1rem}</style></head><body><div class="box"><h1>Block Explorer is starting up</h1><p>This may take a minute.</p><p>Please refresh the page in a moment.</p><button onclick="location.reload()">Refresh</button></div></body></html>';
}
location ~ ^/(api(?!-docs$$)|socket|sitemap.xml|auth/auth0|auth/auth0/callback|auth/logout) {
proxy_pass http://backend:4000;
proxy_set_header Host $$host;
proxy_set_header X-Real-IP $$remote_addr;
proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for;
proxy_set_header Upgrade $$http_upgrade;
proxy_set_header Connection $$connection_upgrade;
}
location / {
proxy_pass http://frontend:3000;
proxy_set_header Host $$host;
proxy_set_header X-Real-IP $$remote_addr;
proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for;
proxy_set_header Upgrade $$http_upgrade;
proxy_set_header Connection $$connection_upgrade;
}
}