forked from webprogramming260/webprogramming
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeployall.sh
More file actions
executable file
·30 lines (24 loc) · 1.13 KB
/
deployall.sh
File metadata and controls
executable file
·30 lines (24 loc) · 1.13 KB
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
#!/bin/bash
while getopts k:h: flag
do
case "${flag}" in
k) key=${OPTARG};;
h) hostname=${OPTARG};;
esac
done
if [[ -z "$key" || -z "$hostname" ]]; then
printf "\nMissing required parameter.\n"
printf " syntax: deployall.sh -k <pem key file> -h <hostname>\n\n"
exit 1
fi
printf "\n-------------------------------\nDeploying all services to with $key\n-------------------------------\n"
cd ../simon-html && ./deployFiles.sh -k ${key} -h ${hostname} -s simon-html
cd ../simon-css && ./deployFiles.sh -k ${key} -h ${hostname} -s simon-css
cd ../simon-javascript && ./deployFiles.sh -k ${key} -h ${hostname} -s simon-javascript
cd ../simon-fetch && ./deployFiles.sh -k ${key} -h ${hostname} -s simon-fetch
cd ../simon-service && ./deployService.sh -k ${key} -h ${hostname} -s simon-service -p 3001
cd ../simon-db && ./deployService.sh -k ${key} -h ${hostname} -s simon-db -p 3002
cd ../simon-react && ./deployReact.sh -k ${key} -h ${hostname} -s simon-react -p 3003
# Deploy the lastest to simon.{hostname} on port 3000
cd ../simon-react && ./deployReact.sh -k ${key} -h ${hostname} -s simon
echo cd ../webprogramming260