-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathsetup
More file actions
executable file
·39 lines (30 loc) · 804 Bytes
/
setup
File metadata and controls
executable file
·39 lines (30 loc) · 804 Bytes
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
#!/bin/sh
FILE_DIR=`perl -e 'use Cwd "abs_path";print abs_path(shift)' $0`
BASE_DIR=`dirname $FILE_DIR`
PROJECT_NAME="code"
IMAGE_NAME=sistemacode/$PROJECT_NAME
CYAN='\033[0;36m'
NC='\033[0m'
RED='\033[0;31m'
verify () {
if [ $? != 0 ]; then
echo "${RED}$1${NC}"
exit 2
fi
}
CURRENT_DIR=`pwd`
cd $BASE_DIR/..
sudo docker -v > /dev/null
verify "Error: You need to install docker first!"
sudo docker-compose -v > /dev/null
verify "Error: You need to install docker-compose first!"
echo "Building docker image."
sudo docker-compose build
verify "Error: building docker image."
cd $CURRENT_DIR
echo "${CYAN}"
echo "####################################"
echo " To start the service run :"
echo " $ scripts/development start"
echo "####################################"
echo "${NC}"