From 757b85cabb7f3e25dea86c64bd59ec3010d7832e Mon Sep 17 00:00:00 2001 From: garrettmills Date: Fri, 7 Feb 2020 20:56:24 -0600 Subject: [PATCH] Update gitignore, add build info --- .gitignore | 3 +++ BUILD.txt | 30 ++++++++++++++++++++++++++++++ www/.gitkeep | 0 www/index.html | 10 ---------- 4 files changed, 33 insertions(+), 10 deletions(-) delete mode 100644 www/.gitkeep delete mode 100644 www/index.html diff --git a/.gitignore b/.gitignore index 0ec3cf4..2332e4a 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,6 @@ typings/ .dynamodb/ # End of https://www.gitignore.io/api/node + +www* +www/** diff --git a/BUILD.txt b/BUILD.txt index 090a256..15c97ea 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -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 ##### git clone git@ssh.dev.azure.com:v3/HackKu/HackKu%202020/frontend frontend cd frontend @@ -6,3 +25,14 @@ ionic build --prod tar czvf target-www.tar.gz ./www ##### 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 diff --git a/www/.gitkeep b/www/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/www/index.html b/www/index.html deleted file mode 100644 index d97103d..0000000 --- a/www/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Missing Frontend - - -

You have not deployed the front-end to this application.

- -