mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
fix
This commit is contained in:
parent
40335d8136
commit
62404acb44
2 changed files with 16 additions and 10 deletions
|
|
@ -19,7 +19,7 @@ RUN mix local.hex --force && \
|
||||||
mix deps.get && \
|
mix deps.get && \
|
||||||
mix compile
|
mix compile
|
||||||
|
|
||||||
RUN mix do ecto.create, ecto.migrate
|
#RUN mix do ecto.create, ecto.migrate
|
||||||
|
|
||||||
RUN mix phx.digest && MIX_ENV=prod mix release
|
RUN mix phx.digest && MIX_ENV=prod mix release
|
||||||
|
|
||||||
|
|
|
||||||
24
start.sh
24
start.sh
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Start PostgreSQL for Blockscout
|
set -e
|
||||||
docker-entrypoint.sh postgres &
|
|
||||||
|
|
||||||
# Wait for DB to be ready
|
# Wait for Postgres to be ready (assumes external Postgres service)
|
||||||
until pg_isready -h localhost -p 5432; do
|
until pg_isready -h "$DB_HOST" -p "$DB_PORT"; do
|
||||||
echo "Waiting for Postgres..."
|
echo "Waiting for Postgres..."
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
@ -15,12 +14,19 @@ geth --dev \
|
||||||
--ws --ws.addr 0.0.0.0 \
|
--ws --ws.addr 0.0.0.0 \
|
||||||
--allow-insecure-unlock --mine --nodiscover &
|
--allow-insecure-unlock --mine --nodiscover &
|
||||||
|
|
||||||
|
# Set environment variables for Blockscout
|
||||||
|
export DATABASE_URL="postgresql://postgres:postgres@${DB_HOST:-localhost}:${DB_PORT:-5432}/blockscout"
|
||||||
|
export ETHEREUM_JSONRPC_HTTP_URL="http://localhost:8545"
|
||||||
|
export PORT=4000
|
||||||
|
export MIX_ENV=prod
|
||||||
|
|
||||||
|
cd /blockscout
|
||||||
|
|
||||||
|
# Run DB setup
|
||||||
|
mix ecto.create
|
||||||
|
mix ecto.migrate
|
||||||
|
|
||||||
# Start Blockscout
|
# Start Blockscout
|
||||||
cd /blockscout && \
|
|
||||||
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/blockscout \
|
|
||||||
ETHEREUM_JSONRPC_HTTP_URL=http://localhost:8545 \
|
|
||||||
PORT=4000 \
|
|
||||||
MIX_ENV=prod \
|
|
||||||
/blockscout/_build/prod/rel/blockscout/bin/blockscout start
|
/blockscout/_build/prod/rel/blockscout/bin/blockscout start
|
||||||
|
|
||||||
wait
|
wait
|
||||||
Loading…
Reference in a new issue