-
Notifications
You must be signed in to change notification settings - Fork 59
/
tools.sh
executable file
·86 lines (67 loc) · 1.88 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
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
set -o errexit
set -o verbose
set -o xtrace
set -o nounset
case "$1" in
demo)
docker-compose up --build --force-recreate
;;
alice)
docker-compose create --build --force-recreate alice
docker-compose run --service-ports alice ./agent.sh run
;;
bob)
docker-compose create --build --force-recreate bob
docker-compose run --service-ports bob ./agent.sh run
;;
agent-docs)
docker-compose create --build --force-recreate test
docker-compose run test ./agent.sh docs
;;
agent-test)
docker-compose create --build --force-recreate test
docker-compose run test ./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
;;
prepare-dao)
docker-compose create --build --force-recreate testrpc
docker-compose create --build --force-recreate dao
docker-compose run --service-ports dao ./dao.sh run
;;
ipfs)
docker-compose run --service-ports ipfs daemon
;;
clean)
docker-compose down --rmi all --remove-orphans
;;
hard-clean)
docker image prune
docker-compose down --rmi all --remove-orphans
docker kill `docker ps -q` || true
docker rm `docker ps -a -q`
docker rmi `docker images -q`
docker volume rm `docker volume ls -qf dangling=true`
;;
create-web-cookie)
docker-compose run agent-web-cookie
;;
gen-ssl)
cd agent
openssl req -nodes -new -x509 -keyout server.key -out server.crt -subj '/CN=localhost'
;;
*) echo 'No operation specified'
exit 0;
;;
esac