Skip to content
This repository was archived by the owner on Apr 11, 2021. It is now read-only.
Open
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
43 changes: 31 additions & 12 deletions up-verifier.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
#!/bin/bash

DOCKERFILE='docker-compose.local.yml'
SERVICES="deployer verifier l1_chain batch_submitter geth_l2"
# Run the verifier along with the sequencer using
# docker-compose

DOCKERFILE='docker-compose.yml'
SERVICES='deployer verifier l1_chain batch_submitter geth_l2'
LOCAL_VERIFIER=

while (( "$#" )); do
case "$1" in
-l|--local)
DOCKERFILE="docker-compose.local.yml"
LOCAL_VERIFIER=true
shift 1
;;
--local-sequencer)
DOCKERFILE="docker-compose.local.yml"
shift 1
;;
--local-verifier)
LOCAL_VERIFIER=true
shift 1
;;
-s|--services)
Expand All @@ -20,14 +33,20 @@ while (( "$#" )); do
esac
done

docker-compose \
-f $DOCKERFILE \
-f optional/verifier-service.yml \
-f optional/verifier-service.local.yml \
down -v --remove-orphans
dcmd="docker-compose"
dcmd="$dcmd -f $DOCKERFILE"
dcmd="$dcmd -f optional/verifier-service.yml"
if [ ! -z $LOCAL_VERIFIER ]; then
dcmd="$dcmd -f optional/verifier-service.local.yml"
fi
dcmd="$dcmd down -v --remove-orphans"
$dcmd

docker-compose \
-f $DOCKERFILE \
-f optional/verifier-service.yml \
-f optional/verifier-service.local.yml \
up $SERVICES
cmd="docker-compose"
cmd="$cmd -f $DOCKERFILE"
cmd="$cmd -f optional/verifier-service.yml"
if [ ! -z $LOCAL_VERIFIER ]; then
cmd="$cmd -f optional/verifier-service.local.yml"
fi
cmd="$cmd up $SERVICES"
exec $cmd