tokenbridge/e2e-commons/up.sh

64 lines
2.2 KiB
Bash
Raw Permalink Normal View History

2019-05-31 16:24:45 +02:00
#!/usr/bin/env bash
cd $(dirname $0)
2019-06-04 14:49:39 +02:00
set -e # exit when any command fails
2019-05-31 16:24:45 +02:00
./down.sh
docker-compose build
docker network create --driver bridge ultimate || true
docker-compose up -d parity1 parity2 e2e
2019-05-31 16:24:45 +02:00
while [ "$1" != "" ]; do
if [ "$1" == "oracle" ]; then
2019-07-17 12:03:29 -03:00
docker-compose up -d redis rabbit oracle oracle-erc20 oracle-erc20-native oracle-amb
2019-05-31 16:24:45 +02:00
docker-compose run -d oracle yarn watcher:signature-request
docker-compose run -d oracle yarn watcher:collected-signatures
docker-compose run -d oracle yarn watcher:affirmation-request
docker-compose run -d oracle-erc20 yarn watcher:signature-request
docker-compose run -d oracle-erc20 yarn watcher:collected-signatures
docker-compose run -d oracle-erc20 yarn watcher:affirmation-request
docker-compose run -d oracle-erc20-native yarn watcher:signature-request
docker-compose run -d oracle-erc20-native yarn watcher:collected-signatures
docker-compose run -d oracle-erc20-native yarn watcher:affirmation-request
2019-07-17 11:47:25 -03:00
docker-compose run -d oracle-amb yarn watcher:signature-request
docker-compose run -d oracle-amb yarn watcher:collected-signatures
docker-compose run -d oracle-amb yarn watcher:affirmation-request
2019-05-31 16:24:45 +02:00
docker-compose run -d oracle yarn sender:home
docker-compose run -d oracle yarn sender:foreign
fi
if [ "$1" == "ui" ]; then
docker-compose up -d ui ui-erc20 ui-erc20-native
2019-06-03 10:11:00 +02:00
docker-compose run -d -p 3000:3000 ui yarn start
docker-compose run -d -p 3001:3000 ui-erc20 yarn start
docker-compose run -d -p 3002:3000 ui-erc20-native yarn start
2019-06-03 10:11:00 +02:00
fi
2019-06-03 13:47:52 +02:00
if [ "$1" == "deploy" ]; then
docker-compose run e2e e2e-commons/scripts/deploy.sh
fi
2019-06-03 15:49:40 +02:00
if [ "$1" == "blocks" ]; then
node ./scripts/blocks.js &
fi
if [ "$1" == "monitor" ]; then
docker-compose up -d monitor monitor-erc20 monitor-erc20-native
fi
if [ "$1" == "native-to-erc" ]; then
../deployment/molecule/molecule.sh ultimate-native-to-erc
fi
if [ "$1" == "erc-to-native" ]; then
../deployment/molecule/molecule.sh ultimate-erc-to-native
fi
if [ "$1" == "erc-to-erc" ]; then
../deployment/molecule/molecule.sh ultimate-erc-to-erc
fi
2019-05-31 16:24:45 +02:00
shift # Shift all the parameters down by one
done