Update gitignore, add build info

This commit is contained in:
garrettmills 2020-02-07 20:56:24 -06:00
parent bcd3503d69
commit 757b85cabb
4 changed files with 33 additions and 10 deletions

3
.gitignore vendored
View File

@ -88,3 +88,6 @@ typings/
.dynamodb/ .dynamodb/
# End of https://www.gitignore.io/api/node # End of https://www.gitignore.io/api/node
www*
www/**

View File

@ -1,3 +1,22 @@
##### BACK END #####
git clone git@ssh.dev.azure.com:v3/HackKu/HackKu%202020/backend backend
cd backend
yarn install
cp build.env .env
#### THIS WILL BE MISSING THE DB CREDENTIALS
#### USE echo TO APPEND THE DB CREDENTIALS TO THE .env FILE SO WE DON'T HAVE THEM IN GIT
node flitter test
#### IF THIS WORKS, DO THE DEPLOY TO PRODUCTION
#### DEPLOYMENT FOR BACKEND ####
#### RUN THESE COMMANDS SSH'D INTO THE PROD VM
cd {path to app folder}
systemctl stop app-backend.service
git pull
rm -rf node_modules
yarn install
systemctl start app-backend.service
##### FRONT END ##### ##### FRONT END #####
git clone git@ssh.dev.azure.com:v3/HackKu/HackKu%202020/frontend frontend git clone git@ssh.dev.azure.com:v3/HackKu/HackKu%202020/frontend frontend
cd frontend cd frontend
@ -6,3 +25,14 @@ ionic build --prod
tar czvf target-www.tar.gz ./www tar czvf target-www.tar.gz ./www
##### target-www.tar.gz is the artifact! ##### ##### target-www.tar.gz is the artifact! #####
#### DEPLOYMENT FOR BACKEND ####
cd {path to app folder}
systemctl stop app-backend.service
rm -rf www.bak
mkdir -p www
mv www www.bak
cp /path/to/target-www.tar.gz .
tar xvzf target-www.tar.gz
#### THIS CREATES A NEW www DIRECTORY
sed -i 's/base href="\/"/base href="\/i\/"/g' www/index.html
#### THIS FIXES THE ROUTE PREFIX HANDLING FOR IONIC

View File

View File

@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Missing Frontend</title>
</head>
<body>
<h1>You have not deployed the front-end to this application.</h1>
</body>
</html>