-
- Build the project on your local machine.
- Fix error if any.
- Push the code to the repo.
- Connect to the server.
- Stop the nextjs server.
- Remove the OLD build.
- Remove the OLD assets.
- Remove the OLD package.json && package-lock.json
- Copy the NEW build.
- Copy the NEW assets.
- Copy the NEW package.json && package-lock.json
- Run npm install --force
- Run the server.
-
-
Push the code to the company git.
-
Run npm run build on your local machine. ( This will make a build in the .next directory )
If there are any errors solve them and build again until all errors are gone. -
Connect to the remote ec2 with SSH key auth in both WinSCP and Putty.
-
In Putty -
# to go to the project directory cd ~/sarvam
# to stop the server pm2 stop all
# to remove the OLD build (i.e. .next folder) sudo rm -rf ./.next
# remove the old package.json && package-lock.json sudo rm -f ./package.json sudo rm -f ./package-lock.json
# remove the OLD assets folder sudo rm -rf <path of the assets folder with changes> # repeat for all the assets folders
- Now do the following after coping the NEW .next folder && assets from your local machine using WinSCP.
cd ~/sarvam
sudo npm install --force
# to run the server pm2 start npm -- start
-
In WinScp -
- Go the "sarvam" dir on the ec2. ( right side panel )
- Go to the project directory on your local machine where the compiled build is. ( left panel )
- Copy the following folder(s)/file(s)
- .next - public ## only the folders with changes - Assets ## only the folders with changes - package.json
- Now finish the deployment in Putty using the copied folder.
-
forked from TKP1903/Sarvam-Multikart
-
Notifications
You must be signed in to change notification settings - Fork 0
aashishsingla567/Sarvam-Multikart
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- CSS 37.8%
- JavaScript 35.9%
- SCSS 25.9%
- Other 0.4%