- Replace with your deployer remote url
- Change <project_name.wsgi> to your project_name.wsgi
- Change your runtime.txt value to your python version
Created
January 4, 2019 12:09
-
-
Save Timtech4u/bd880e0284a0f26b16b59f02a7109f09 to your computer and use it in GitHub Desktop.
Deploying Django
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # First-time only (update when you have new dependencies) | |
| pip install gunicorn | |
| pip install django-heroku | |
| pip freeze > requirements.txt | |
| # Run this once | |
| git remote add deploy <remote-url> | |
| # Run this whenever you have updates to deploy | |
| git add . | |
| git commit -m "updated codes" | |
| git push deploy master | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: gunicorn <project_name.wsgi> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python-3.6.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import django_heroku | |
| # All the way at the bottom of the file | |
| # ... | |
| django_heroku.settings(locals()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment