-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·49 lines (45 loc) · 1.3 KB
/
build.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
#!/bin/bash
#
# o o
# 8
# .oPYo. .oPYo. odYo. o8P o8 .oPYo. odYo. .oPYo. .oPYo.
# Yb.. 8oooo8 8' `8 8 8 8oooo8 8' `8 8 ' 8oooo8
# 'Yb. 8. 8 8 8 8 8. 8 8 8 . 8.
# `YooP' `Yooo' 8 8 8 8 `Yooo' 8 8 `YooP' `Yooo'
# :.....::.....:..::..::..::..:.....:..::..:.....::.....:
# :::::::::::::::::::::::::::::::::::::::::::::::::::::::
# :::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# Copyright Yazan Obeidi, 2017
#
# sentience build script
#
# Usage: $./build.sh [--dev|--prod]
#
# Get single argument passed
OPT=$1
# Tidy up, make output of rm silent in case it does not exist
rm docker-compose.yml &>/dev/null
case $OPT in
-h|--help)
echo "Sentience build script"
echo "Usage: "
echo " "
echo "$./build.sh [depoyment]"
echo "-d|--dev : development"
echo "-p|--prod : production"
;;
-d|--dev)
echo "Building for development"
cp compose/dev.yml docker-compose.yml
;;
-p|--prod)
echo "Building for production"
cp compose/prod.yml docker-compose.yml
;;
*)
echo "No deployment option specified"
;;
esac
# Deploy
docker-compose up --build