2019-05-31 17:24:45 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
2021-05-15 19:29:20 +03:00
|
|
|
if [ $CI ]; then
|
|
|
|
rm -rf logs || true
|
|
|
|
|
|
|
|
mkdir ./logs
|
|
|
|
|
|
|
|
for project in "" validator{1,2,3}; do
|
|
|
|
for container in $(docker-compose -p "$project" ps | tail -n +3 | awk '{print $1}') ; do
|
|
|
|
if [[ -z "$project" ]]; then
|
|
|
|
path="./logs/$container.log"
|
|
|
|
else
|
|
|
|
mkdir -p "./logs/$project"
|
|
|
|
path="./logs/$project/$container.log"
|
|
|
|
fi
|
|
|
|
docker logs "$container" > "$path" 2>&1
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
touch ../oracle/.env
|
|
|
|
for file in ../oracle/docker-compose-{amb,transfer}.yml; do
|
|
|
|
for container in $(docker-compose -f "$file" ps | tail -n +3 | awk '{print $1}') ; do
|
|
|
|
mkdir -p "./logs/oracle"
|
|
|
|
docker logs "$container" > "./logs/oracle/$container.log" 2>&1
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $rc;
|
|
|
|
fi
|
2019-06-04 10:12:24 +03:00
|
|
|
|
2021-04-16 12:31:12 +03:00
|
|
|
ps | grep node | grep -v grep | grep -v yarn | awk '{print "kill " $1}' | /bin/bash
|
2019-05-31 17:24:45 +03:00
|
|
|
docker-compose down
|
2021-05-09 16:34:19 +03:00
|
|
|
docker-compose -p validator1 down
|
2020-01-20 23:00:04 +03:00
|
|
|
docker-compose -p validator2 down
|
|
|
|
docker-compose -p validator3 down
|
2019-07-26 11:14:25 +03:00
|
|
|
docker network rm ultimate || true
|