-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Blockscout explorer deployment to devnet docker-compose #45
base: main
Are you sure you want to change the base?
Conversation
When I do
But when I open localhost in the browser, i get an nginx error:
|
@metachris yeah, I mentioned in the note, that the frontend container starts comparatively long (1-2 minutes)
After 1-2 minutes from the docker containers launch, explorer UI will be available at http://localhost. |
Why does the frontend container need 1-2 minutes to start? This seems unreasonably long 🤔 We'd also appreciate if we could collapse the seven blockscout containers down to a single one, even if it's run just in some dev mode. Can you do that? |
We'll try to address it in the next release of the frontend.
Not sure, I'd say this will complicate components basic updates delivery. |
This has been resolved with the latest version of frontend (PR has been updated).
I created an alternative PR #69 with 2 containers for Blockscout in total: application + DB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR @vbaranov!
I got couple of questions.
# INDEXER_TOKEN_INSTANCE_LEGACY_SANITIZE_BATCH_SIZE=10 | ||
# TOKEN_INSTANCE_OWNER_MIGRATION_CONCURRENCY=5 | ||
# TOKEN_INSTANCE_OWNER_MIGRATION_BATCH_SIZE=50 | ||
SUAVE_BID_CONTRACTS=0x8f21fdd6b4f4cacd33151777a46c122797c8bf17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question:
what are these contract(s)? are they relevant for SUAVE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this an address of the SUAVE contract which emits BidEvent
event in devnet afaik
NETWORK= | ||
SUBNETWORK=Awesome chain | ||
LOGO=/images/blockscout_logo.svg | ||
ETHEREUM_JSONRPC_WS_URL=ws://host.docker.internal:8546/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue:
for some reason this seems to keep failing:
websocat "ws://localhost:8080/socket/v2/websocket?vsn=2.0.0" -vvv
[INFO websocat::lints] Auto-inserting the line mode
[DEBUG websocat] Done third phase of interpreting options.
[DEBUG websocat] Done fourth phase of interpreting options.
[DEBUG websocat] Preparation done. Now actually starting.
[DEBUG websocat::sessionserve] Serving Line2Message(ThreadedStdio) to Message2Line(WsClient("ws://localhost:8080/socket/v2/websocket?vsn=2.0.0")) with Options { websocket_text_mode: true, websocket_protocol: None, websocket_reply_protocol: None, udp_oneshot_mode: false, udp_broadcast: false, udp_multicast_loop: false, udp_ttl: None, udp_join_multicast_addr: [], udp_join_multicast_iface_v4: [], udp_join_multicast_iface_v6: [], udp_reuseaddr: false, unidirectional: false, unidirectional_reverse: false, max_messages: None, max_messages_rev: None, exit_on_eof: false, oneshot: false, unlink_unix_socket: false, unix_socket_accept_from_fd: false, exec_args: [], ws_c_uri: "ws://0.0.0.0/", linemode_strip_newlines: false, linemode_strict: false, origin: None, custom_headers: [], custom_reply_headers: [], websocket_version: None, websocket_dont_close: false, websocket_ignore_zeromsg: false, one_message: false, no_auto_linemode: false, buffer_size: 65536, broadcast_queue_len: 16, read_debt_handling: Warn, linemode_zero_terminated: false, restrict_uri: None, serve_static_files: [], exec_set_env: false, no_exit_on_zeromsg: false, reuser_send_zero_msg_on_disconnect: false, process_zero_sighup: false, process_exit_sighup: false, process_exit_on_disconnect: false, socks_destination: None, auto_socks5: None, socks5_bind_script: None, tls_domain: None, tls_insecure: false, headers_to_env: [], max_parallel_conns: None, ws_ping_interval: None, ws_ping_timeout: None, request_uri: None, request_method: None, request_headers: [], autoreconnect_delay_millis: 20, ws_text_prefix: None, ws_binary_prefix: None, ws_binary_base64: false, ws_text_base64: false, close_status_code: None, close_reason: None, asyncstdio: false, foreachmsg_wait_reads: false, announce_listens: false, timestamp_monotonic: false, print_ping_rtts: false, byte_to_exit_on: 28, max_ws_message_length: 209715200, max_ws_frame_length: 104857600, preamble: [], preamble_reverse: [], compress_deflate: false, compress_zlib: false, compress_gzip: false, uncompress_deflate: false, uncompress_zlib: false, uncompress_gzip: false, jsonrpc_omit_jsonrpc: false, inhibit_pongs: None, max_sent_pings: None }
[INFO websocat::stdio_threaded_peer] get_stdio_peer (threaded)
[DEBUG websocat::sessionserve] Underlying connection established
[INFO websocat::ws_client_peer] get_ws_client_peer
websocat: WebSocketError: I/O failure
websocat: error running
do you have any idea why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also:
application=phoenix [info] CONNECTED TO BlockScoutWeb.UserSocketV2 in 1ms │
│ Transport: :websocket │
│ Serializer: Phoenix.Socket.V1.JSONSerializer │
│ Parameters: %{} │
│ 2023-10-20T12:10:08.667 [error] Ranch listener BlockScoutWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.14257.53> exit with reason: {:function_clause, [{Phoenix. │
│ Socket.Message, :from_map!, [["47", "47", "transactions:new_transaction", "phx_join", %{}]], []}, {Phoenix.Socket, :__in__, 2, [file: 'lib/phoenix/socket.ex', line: 466]}, {Phoenix.Endpoint.Cowboy2Handler, │
│ :websocket_handle, 2, [file: 'lib/phoenix/endpoint/cowboy2_handler.ex', line: 175]}, {:cowboy_websocket, :handler_call, 6, [file: '/app/deps/cowboy/src/cowboy_websocket.erl', line: 528]}, {:cowboy_http, : │
│ loop, 1, [file: '/app/deps/cowboy/src/cowboy_http.erl', line: 257]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}
|
||
services: | ||
blockscout-backend: | ||
image: blockscout/blockscout-suave:${DOCKER_TAG:-latest} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
it would be great if we could pin the tags to immutable values. having "latest" makes it hard to reproduce issues as latest
tag is a constantly moving target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, explicit versions of Docker images configured here 590e665
…e db instance for stats and backend; enhance proxy template
📝 Summary
Adding Blockscout explorer deployment to devnet docker-compose.
Blockscout components are added to the main
docker-compose.yml
.Description of new added files:
suave/devenv/blockscout/services/*
- configs of Blockscout components: backend, frontend, 2 Postgres DBs (backend and stats), stats, visualizer, sig-provider, Redis, Nginx proxy.suave/devenv/blockscout/envs/*
- default env variables values for Blockscout components.suave/devenv/blockscout/proxy/default.conf.template
- Nginx proxy config template.Running instructions are the same:
make devnet-up
. Blockscout explorer will be running at http://localhost:8080.Note: the longest startup time will be at
frontend
container. It usually takes 1-2 minutes to start.Successful frontend container start will follow after these lines in the logs (
docker logs frontend -f
):UI of the explorer:
📚 References
https://twitter.com/blockscoutcom/status/1696117267535102199
https://docs.blockscout.com/for-developers/information-and-settings/docker-integration-local-use-only