#Setup
##Django setup
virtualenv -p python3.6 .venv
source .venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
##Node
npm install
Install CLI
https://devcenter.heroku.com/articles/getting-started-with-python#set-up
Conifigure
heroku login
#Local Testing
1. source .venv/bin/activate
2. [optional] pip install -r requirements.txt
3. [optional] python manage.py makemigrations
4. [optional] python manage.py migrate
5. npx webpack --mode development ./frontend/src/index.js --output ./frontend/static/frontend/main.js
6. python manage.py collectstatic --no-input
7. heroku local
#Deploying
git add
Add changes andgit push
to master- Check the deploy status
https://dashboard.heroku.com/apps/marcsloan
- Download sourcetree to get Git setup easily, connect to my Github account and download the source code
- Download Git Credential Manager https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md so I can easily log into Github locally
- Download Heroku CLI
- Navigate to source folder and run
heroku git:remote -a marcsloan
to connect Heroku to my local respository
- Go to the local git repository, use CLI to git add, commit and push
- Do the
heroku login
git push
to push to githubgit push heroku
to push to heroku and re-deploy