Added individual deploy scripts.
This commit is contained in:
parent
5c54616c48
commit
9669311987
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
echo "Building API"
|
||||
cd api
|
||||
dub clean
|
||||
dub build --build=release --compiler=/opt/ldc2/ldc2-1.36.0-linux-x86_64/bin/ldc2
|
||||
cd ..
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
echo "Building app"
|
||||
cd app
|
||||
rm -rf dist
|
||||
npm run build
|
||||
cd ..
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
ssh -f root@andrewlalis.com 'systemctl stop teacher-tools-api.service'
|
||||
scp api/teacher-tools-api root@andrewlalis.com:/opt/teacher-tools/
|
||||
ssh -f root@andrewlalis.com 'systemctl start teacher-tools-api.service'
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
rsync -rav -e ssh --delete app/dist/* root@andrewlalis.com:/opt/teacher-tools/app-content
|
24
deploy.sh
24
deploy.sh
|
@ -1,23 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
./build-app.sh
|
||||
./build-api.sh
|
||||
|
||||
# Script for deploying the application to teacher-tools.andrewlalis.com.
|
||||
|
||||
echo "Building app"
|
||||
cd app
|
||||
rm -rf dist
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
echo "Building API"
|
||||
cd api
|
||||
dub clean
|
||||
dub build --build=release --compiler=/opt/ldc2/ldc2-1.36.0-linux-x86_64/bin/ldc2
|
||||
cd ..
|
||||
|
||||
ssh -f root@andrewlalis.com 'systemctl stop teacher-tools-api.service'
|
||||
scp api/teacher-tools-api root@andrewlalis.com:/opt/teacher-tools/
|
||||
rsync -rav -e ssh --delete app/dist/* root@andrewlalis.com:/opt/teacher-tools/app-content
|
||||
ssh -f root@andrewlalis.com 'systemctl start teacher-tools-api.service'
|
||||
./deploy-app.sh
|
||||
./deploy-api.sh
|
||||
|
|
Loading…
Reference in New Issue