-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexec.sh
executable file
·36 lines (33 loc) · 1.05 KB
/
exec.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
#!/bin/bash
# install complete of management of dockers
# containers and images
export GEM_SET_DEBUG="True"
if [ $GEM_SET_DEBUG ]; then
export PS4='+${BASH_SOURCE}:${LINENO}:${FUNCNAME[0]}: '
set -x
fi
export name_project="$1"
export no_exec_test="$2"
export type_install="$3"
if [ "$name_project" = "" and "$type_install" = "" ]; then
echo "Need to add name project and install dev or prod as arguments"
exit 1
fi
if [ -d "$name_project" -a -f "${name_project}/.env" ]; then
cd "$name_project"
docker-compose down
docker network prune --force
# docker rmi -f $(docker images --filter dangling=true -qa)
docker volume rm $(docker volume ls -q)
docker rmi -f $(docker images -qa)
docker system prune --force
# docker volume prune --force
# docker rmi $(docker images -a -q)
docker builder prune -f --all
cd -
fi
export GEM_GIT_PACKAGE="oq-platform3"
export GEM_GIT_REPO="[email protected]:gem"
export NO_EXEC_TEST=$no_exec_test
echo "exec install.sh"
./install.sh "" "" "" $NO_EXEC_TEST $name_project $type_istall