The result of this will be that when you create a pull request to merge a branch to master, it will deploy to your heroku development app/dyno and when you merge or push to master on github, it will deploy the app to the production heroku app/dyno.
- Clone this repo to your local (DO NOT FORK THIS REPO, IF YOU DO YOU HAVE TO ENABLE ACTIONS BEFORE ANYTHING RUNS)
- Create a new repo on your own account
- Remove the origin remote and replace it with your own new repo. (Do not add a readme or anything it should be empty)
- Create an account with Heroku, create an app for production and an app for development
- Create a new repo in Docker hub
- Add repository settings for action secrets for DOCKER_USERNAME, DOCKER_PASSWORD, HEROKU_API_KEY (put the appropriate values in)
Heroku Notes: Get the heroku API key from account in: -> applications -> create authorization button
- Change line 42 to have your docker repo address in: .github/workflows/prod.yml
- change lines 58 to have your heroku app name in: .github/workflows/prod.yml
- change line 59 to have your heroku email in: .github/workflows/prod.yml
- change line 31 to have your heroku app name in .github/workflows/dev.yml
- change line 32 to have your heroku email in .github/workflows/dev.yml
- Push your local repo and fix any errors that appear when the workflow is running. You can check the workflow in the actions.
- To Build with docker compose: docker compose up --build
- To run tests, Lint, and Coverage report use this command: pytest --pylint --cov
.pylintrc is the config for pylint .coveragerc is the config for coverage setup.py is a config file for pytest