Skip to content
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

start-apps script can now select apps to start #1432

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions bin/mumbai-challenger.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /bin/bash
set -o allexport
BLOCKCHAIN_URL="$2"
CHALLENGER_KEY="$1"
NF_SERVICES_TO_START='optimist'
APP_SERVICES_TO_START='challenger'
ENVIRONMENT=mumbai
USE_EXTERNAL_NODE=true
ERC20_COIN=WMATIC
FEE_L2_TOKEN_ID=WMATIC
ETH_NETWORK=mumbai
DEPLOY_MOCKED_SANCTIONS_CONTRACT=
STATE_GENESIS_BLOCK=32132680
CONFIRMATIONS=12
OPTIMIST_HOST='localhost'
OPTIMIST_WS_PORT='8082'
set +o allexport
36 changes: 35 additions & 1 deletion bin/start-apps
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
#! /bin/bash
docker-compose -f docker/docker-compose.apps.yml -p 'nightfall_3' up

trap "docker-compose -f docker/docker-compose.apps.yml -p 'nightfall_3' down --remove-orphans -t 1; exit 1" SIGHUP SIGINT SIGTERM

usage()
{
echo "Usage:"
echo " -c or --challenger; to start the challenger"
echo " -p or --proposer; to start the proposer"
echo " -h or --help; to print this message"
echo "If nothing is specified then both challenger and proposer will be run"
echo "if APP_SERVICES_TO _START is exported then it will override the above, acceptable values are 'challenger', 'proposer', 'challenger,proposer'"
}
# if APP_SERVICES_TO_START already exists then it overrides anything we attempt to set with this script.
if [ -z "$APP_SERVICES_TO_START" ]; then
if [ -z "$$1" ]; then
APP_SERVICES_TO_START="challenger,proposer"
fi

while [ -n "$1" ]; do
case $1 in
-c | --challenger ) APP_SERVICES_TO_START=$APP_SERVICES_TO_START" challenger"
;;
-p | --proposer ) APP_SERVICES_TO_START=$APP_SERVICES_TO_START" proposer"
;;
-h | --help ) usage
exit 0
;;
* ) usage
exit 1
esac
shift
done
fi

docker-compose -f docker/docker-compose.apps.yml -p 'nightfall_3' up ${APP_SERVICES_TO_START//,/ }