cronos-blockscout
cronos-blockscout copied to clipboard
I cannot get cronos-blockscout work
I follow the instructions (see notes):
git clone https://github.com/crypto-org-chain/cronos-blockscout.git
cd cronos-blockscout
asdf install
export DATABASE_URL=postgresql://<username>:<username_password>@localhost:5432/blockscout
mix do deps.get, local.rebar --force, deps.compile
mix phx.gen.secret
UjkomPOS3FuoIz9Ssxvh4REJNlwfhCvJbpEVhInwhyOaCmAfRjXd43VwLf9zZ7bL
export SECRET_KEY_BASE=UjkomPOS3FuoIz9Ssxvh4REJNlwfhCvJbpEVhInwhyOaCmAfRjXd43VwLf9zZ7bL
- Export remaining environment variables as needed.
export ETHEREUM_JSONRPC_VARIANT=geth
export ETHEREUM_JSONRPC_HTTP_URL=http://127.0.0.1:26661
export API_V2_ENABLED=true
export PORT=3001
export COIN=tCRO
export COIN_NAME=tCRONOS
export DISPLAY_TOKEN_ICONS=true
export MIX_ENV=dev
- Compile application.
mix compile
- If not already running, start Postgres:
services postgresql start
- Check postgres status:
pg_isready
- Create and migrate database Install Node.js dependencies
mix do ecto.create, ecto.migrate
- Install Node.js dependencies (v18.0.0)
cd apps/block_scout_web/assets
npm install
npm run deploy
npx browserslist@latest --update-db
node node_modules/webpack/bin/webpack.js --mode production
- Wait to finnish
cd -
cd apps/explorer
npm install
cd -
- Build static assets for deployment
- Create, if do not exists: …/apps/ethereum_jsonrpc/priv/static, …/apps/explorer/priv/static, …/apps/indexer/priv/static, …/apps/block_scout_web/priv/static
mix phx.digest
cd apps/block_scout_web
mix phx.gen.cert blockscout blockscout.local
cd -
- Add blockscout and blockscout.local to your /etc/hosts
127.0.0.1 localhost blockscout blockscout.local
255.255.255.255 broadcasthost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback blockscout blockscout.local
- Reboot
docker compose up --build