Skip to content

Commit

Permalink
Blockscout Docker Integration (#252)
Browse files Browse the repository at this point in the history
* Blockscout Docker Added

* Update frontend.env

* Update frontend.env

* update file location

---------

Co-authored-by: LEAFERx <[email protected]>
  • Loading branch information
ayushbuidl and LEAFERx authored Jan 18, 2024
1 parent 07cfb48 commit 7c0de79
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config/example/blockscout/blockscout.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CHAIN_ID=13527
SUBNETWORK=Specular Devnet
LOGO=/images/specular_logo_horizontal.svg
LOGO_FOOTER=/images/specular_logo_horizontal.svg
COIN_NAME=ETH
COIN=ETH
SHOW_TESTNET_LABEL=true
TESTNET_LABEL_TEXT=Devnet
APPS_MENU=false
BLOCKSCOUT_VERSION=v5.2.2-beta
SECRET_KEY_BASE=56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN # Placeholder secret
54 changes: 54 additions & 0 deletions config/example/blockscout/frontend.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Set of ENVs for local network explorer
# frontend app URL - https://localhost:3000/
# API URL - https://localhost:4000/

# api configuration
# NEXT_PUBLIC_API_HOST=https://localhost:4000/
# NEXT_PUBLIC_API_BASE_PATH=/

# app configuration
NEXT_PUBLIC_APP_PROTOCOL=http
NEXT_PUBLIC_APP_HOST=localhost
NEXT_PUBLIC_APP_PORT=3000

# blockchain parameters
NEXT_PUBLIC_NETWORK_NAME=Specular Network
NEXT_PUBLIC_NETWORK_SHORT_NAME=Specular
NEXT_PUBLIC_NETWORK_ID=13527
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=Ether
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE=validation
NEXT_PUBLIC_NETWORK_RPC_URL=http://localhost:4011
NEXT_PUBLIC_IS_TESTNET=true

# ui config
## homepage
NEXT_PUBLIC_HOMEPAGE_PLATE_BACKGROUND=linear-gradient(136.9deg,rgb(107 94 236) 1.5%,rgb(0 82 255) 56.84%,rgb(82 62 231) 98.54%)
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs','coin_price','market_cap']
## sidebar
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/dev/configs/featured-networks/eth-goerli.json
NEXT_PUBLIC_NETWORK_LOGO=https://raw.githubusercontent.com/SpecularL2/blockscout/specular/apps/block_scout_web/assets/static/images/specular_logo_horizontal.svg
NEXT_PUBLIC_NETWORK_ICON=https://raw.githubusercontent.com/SpecularL2/blockscout/specular/apps/block_scout_web/assets/static/images/specular_logo_horizontal.svg
## footer
NEXT_PUBLIC_FOOTER_LINKS=https://raw.githubusercontent.com/SpecularL2/blockscout/specular/apps/block_scout_web/assets/static/images/footer.json
## favicon
FAVICON_MASTER_URL=https://raw.githubusercontent.com/SpecularL2/blockscout/specular/apps/block_scout_web/assets/static/images/favicon.ico

## misc
NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'Specular Explorer','baseUrl':'https://explorer.specular.network'}]
## views
NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE=gradient_avatar

# app features
NEXT_PUBLIC_APP_ENV=development
NEXT_PUBLIC_SENTRY_DSN=https://o4506070681583616.ingest.sentry.io/4506070879043584 #sentry-dsn-placeholder
NEXT_PUBLIC_AUTH0_CLIENT_ID=MdUYpopauKcbnRD1DzpJ0QXJ4H3Tekf3 #auth0-client-id-placeholder
NEXT_PUBLIC_WEB3_WALLETS=['coinbase']
NEXT_PUBLIC_WEB3_DISABLE_ADD_TOKEN_TO_WALLET=true
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
NEXT_PUBLIC_AUTH_URL=http://localhost:3000
NEXT_PUBLIC_LOGOUT_URL=https://blockscoutcom.us.auth0.com/v2/logout
NEXT_PUBLIC_IS_OPTIMISTIC_L2_NETWORK=true
NEXT_PUBLIC_L1_BASE_URL=https://eth-goerli.blockscout.com
NEXT_PUBLIC_OPTIMISTIC_L2_WITHDRAWAL_URL=https://bridge.devnet.specular.network/
93 changes: 93 additions & 0 deletions docker/docker-compose-specular-blockscout-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
version: '3.8'

services:

backend:
extends:
file: ../blockscout/docker-compose/docker-compose.yml
service: blockscout
container_name: 'blockscout'
depends_on:
- db
- smart-contract-verifier
- redis_db
links:
- db:database
- redis_db:redis
extra_hosts:
- 'host.docker.internal:host-gateway'
env_file:
- ../config/example/blockscout/blockscout.env
environment:
ETHEREUM_JSONRPC_VARIANT: 'geth'
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_WS_URL: ws://host.docker.internal:8545/
INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: 'true'
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true'
DATABASE_URL: postgresql://postgres:@database:5432/blockscout
ECTO_USE_SSL: 'false'
API_V2_ENABLED: 'true'
MIX_ENV: 'prod'
ports:
- 4000:4000
volumes:
- ./logs/:/app/logs/

redis_db:
image: 'redis:alpine'
container_name: redis_db
command: redis-server
volumes:
- ${REDIS_DATA:-$PWD/redis-data}:/data

db:
extends:
file: ../blockscout/docker-compose/docker-compose.yml
service: db

smart-contract-verifier:
extends:
file: ../blockscout/docker-compose/docker-compose.yml
service: smart-contract-verifier

visualizer:
extends:
file: ../blockscout/docker-compose/docker-compose.yml
service: visualizer

sig-provider:
extends:
file: ../blockscout/docker-compose/docker-compose.yml
service: sig-provider

frontend:
env_file:
- ../config/example/blockscout/frontend.env
depends_on:
- backend
extends:
file: ../blockscout/docker-compose/docker-compose-no-build-frontend.yml
service: frontend

stats-db:
depends_on:
- backend
extends:
file: ../blockscout/docker-compose/docker-compose-no-build-frontend.yml
service: stats-db

stats:
depends_on:
- stats-db
extends:
file: ../blockscout/docker-compose/docker-compose-no-build-frontend.yml
service: stats

proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ../blockscout/docker-compose/docker-compose-no-build-frontend.yml
service: proxy

0 comments on commit 7c0de79

Please sign in to comment.