-
Notifications
You must be signed in to change notification settings - Fork 59
/
tools.sh
executable file
·75 lines (56 loc) · 1.49 KB
/
tools.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env bash
set -o errexit
set -o verbose
set -o xtrace
set -o nounset
function recreate_agent_image {
docker-compose create --build --force-recreate agent
}
case "$1" in
demo)
docker-compose up --build --force-recreate
;;
agent)
recreate_agent_image
docker-compose run --service-ports agent ./agent.sh run
;;
agent-docs)
recreate_agent_image
docker-compose run agent ./agent.sh docs
;;
agent-test)
recreate_agent_image
docker-compose run agent ./agent.sh test
;;
agent-web)
docker-compose run --service-ports agent-web ./agent-web.sh run
;;
geth)
docker-compose run --service-ports geth geth --datadir=/geth-data --metrics --shh --rpc --rpcaddr 0.0.0.0 --ws --wsaddr 0.0.0.0 --nat none --verbosity 5 --vmdebug --dev --maxpeers 0 --gasprice 0 --debug --pprof
;;
solc)
docker-compose run --service-ports geth solc --help
;;
parity)
docker-compose run --service-ports parity parity --help
;;
truffle)
docker-compose run --service-ports truffle truffle --help
;;
clean)
docker-compose down --rmi all --remove-orphans
;;
hard-clean)
docker-compose down --rmi all --remove-orphans
docker ps -q | xargs -r docker kill
docker ps -a -q | xargs -r docker rm
docker images -q | xargs -r docker rmi
docker volume ls -qf dangling=true | xargs -r docker volume rm
;;
create-web-cookie)
docker-compose run agent-web-cookie
;;
*) echo 'No operation specified'
exit 0;
;;
esac