[Workflow] Normal Deployment - sparc-software-hust/fmecg-web-server GitHub Wiki
How to deploy server and web (manually)
- deploy server
- open terminal console, then run code
cd /var/www
to access deploy folder
- run
git clone https://github.com/techcomrade/fmECG.git
to clone project
- switch to
deploy
branch
- run
cd fmECG/server-web
to access server-web folder
- now you need to copy env.prod file and paste in server-web folder
- run
npm install
to install package
- check file env.prod again and make sure the values in there are correct
- after doing all the above work you can run project by
pm2 start server.sh
- deploy web
- open terminal console, then run code
cd /var/www
to access deploy folder
- run
git clone https://github.com/techcomrade/fmECG.git
to clone project
- switch to
deploy
branch
- run
npm run build
to build frontend_web in your local laptop
- upload build folder from your local environment into bin folder in host
- copy code in file index.html in build folder and paste them in home.js file in
frontend_web/bin/views
- run
cd frontend_web/bin
to access bin folder
- now you need to copy env.prod file and paste in bin folder
- run
npm install
to install package in frontend_web/bin/views
- check file env.prod again and make sure the values in there are correct
- after doing all the above work you can run project by
pm2 start frontend.sh
- check deploy status
- run
pm2 status
to check deploy status
- if status is
running
, then you are done deploying