-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker-compose and modify entrypoint for dockerfile
- Loading branch information
1 parent
6cb5dfe
commit bfb092d
Showing
3 changed files
with
60 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: '3.4' | ||
|
||
volumes: | ||
l2_data: | ||
|
||
|
||
services: | ||
morph-geth: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "8545:8545" | ||
- "8546:8546" | ||
- "8551:8551" | ||
- "30303:30303" | ||
volumes: | ||
- "${PWD}/db:/db" | ||
- "${PWD}/build/jwt-secret.txt:/config/jwt-secret.txt" | ||
- "${PWD}/genesis_l2.json:/genesis.json" | ||
entrypoint: # pass the L2 specific flags by overriding the entry-point and adding extra arguments | ||
- "/bin/sh" | ||
- "/entrypoint.sh" | ||
- "--authrpc.jwtsecret=/config/test-jwt-secret.txt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
GETH_DATA_DIR=/db | ||
GETH_CHAINDATA_DIR="$GETH_DATA_DIR/geth" | ||
GENESIS_FILE_PATH="${GENESIS_FILE_PATH:-/genesis.json}" | ||
|
||
|
||
if [[ ! -e "$GETH_CHAINDATA_DIR" ]]; then | ||
echo "$GETH_CHAINDATA_DIR missing, running init" | ||
echo "Initializing genesis." | ||
geth --verbosity=3 init --datadir="$GETH_DATA_DIR" "$GENESIS_FILE_PATH" | ||
else | ||
echo "$GETH_KEYSTORE_DIR exists." | ||
fi | ||
|
||
|
||
geth \ | ||
--datadir="$GETH_DATA_DIR" \ | ||
--verbosity=3 \ | ||
--http \ | ||
--http.corsdomain="*" \ | ||
--http.vhosts="*" \ | ||
--http.addr=0.0.0.0 \ | ||
--http.port=8545 \ | ||
--http.api=web3,debug,eth,txpool,net,scroll,engine \ | ||
--networkid=53077 \ | ||
--authrpc.addr="0.0.0.0" \ | ||
--authrpc.port="8551" \ | ||
--authrpc.vhosts="*" \ | ||
--authrpc.jwtsecret=/config/jwt-secret.txt \ | ||
--gcmode=archive |