This guide includes the detail to perform a productive deployment of project Silma.
- Make sure to be in
production
branch:
git checkout production
- If needed add a remote to the local repository.
heroku git:remote -a silma
- To easily deploy all changes made in master, run a shell script that automatically builds the project and deploys to heroku:
bash deploy.sh
# or
sudo sh deploy.sh
Note: make sure to be at the top of the project
If for some reason you need to do this manually, do the following
- Make sure you pull all changes made in master:
git pull origin master
-
Go to the file
back/.gitignore
and remove thedist
line. -
Build the project for production:
Note: make sure to be at the top of the project
npm run build-prod
This will create files inside back/dist
- Push your changes to this branch:
git add .
git commit -m "Build for production"
git push
- Push your production code to Heroku:
heroku login
git push heroku production:master
Open app in browser: https://silma.herokuapp.com
Also you can check logs from heroku:
heroku logs --tail