Update the backend
Here are the steps you need to take to update your deployed backend to the latest version if you want to take advantage of new features and bug fixes.
If you've deployed your application on Heroku, here are some of the steps you need to take -
- Make sure the Heroku CLI is installed - https://devcenter.heroku.com/articles/heroku-cli
- Open the project directory in a terminal
- Run cd <PRODUCT_ID>Backend
- Run git pull origin master
- If you've already deployed a project on Heroku using the Heroku CLI skip to Step 8. If you've used a different method like using the 1-Click deploy mechanism, continue to Step 6.
- Run heroku login and enter your heroku credentials
- Run heroku git:remote -a <heroku-project-name>
- Run git push heroku master
You should now have the updated changes on your heroku backend.
Using other methods should be fairly simple.
If you've done a deployment from source, you can run git pull origin master and redo the steps in the manual deployment guide.
If you are deploying using docker and using the latest tag, then you will just need to pull in newer image and restart -
docker-compose up --force-recreate --build -d
You will still have the old docker image taking up space. If you want to remove that you can do docker image prune -f. Make sure you don't accidentally delete an image you didn't want to delete.