-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
Fanny Dolisy edited this page May 4, 2023
·
9 revisions
- Ensure you are connected to the UTD VPN or UTD wifi
- SSH using the provided name and password from the professor
- You are now on the server
- To access the code base,
cd TeamUp
Currently, the server and frontend are running on this server, any code changes on either will require a new deployment *** As of right now you cannot pull from master for deployment, only pull from the deployment branch ***
- Pull all code changes using
git pull
cd client
- pull down your change -
git pull
-
npm install
-installs any potential new dependencies - in
package.js
ensure these lines are correct and present - "homepage": "http://csa-4485-02.utdallas.edu"` - For all routes in the
pages
andcomponents
directories, ensure they are not hardcoded to localhost, if they are, update them to have the correct URL - THIS IS VERY IMPORTANT, do not overlook this step, otherwise pages and buttons will not route correctly - Once you have updated all necessary code changes,
cd client
- Delete all build files in /var/www/html/ -
sudo rm -rf /var/www/html/*
- Build the frontend -
npm run build
cd build
- Copy all build files into /var/www/html/ -
sudo cp * -r /var/www/html/*
- You should be able to see your frontend changes in the deployment link
- run
pm2 stop TeamUp
- to stop the server from running - pull down your change -
git pull
cd server
-
npm install
-installs any potential new dependencies - Ensure the port number in
app.js
is 1111 - to test your change without keeping it running -
npm run app
(recommended to test before deploying) - to deploy your change -
pm2 start app.js --name TeamUp
- To ensure the background process is running, run
pm2 status
and you should seeTeamUp
in green, otherwise its not running - Your server should now be running and be able to process requests
Date - 04/2023