https://github.com/arjuntheprogrammer/heroku_django_deploy_try
https://github.com/arjuntheprogrammer/heroku_django_deploy_try
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/arjuntheprogrammer/heroku_django_deploy_try
- Owner: arjuntheprogrammer
- Created: 2017-06-15T07:21:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T07:25:40.000Z (almost 9 years ago)
- Last Synced: 2025-01-26T20:29:48.002Z (about 1 year ago)
- Language: CSS
- Size: 6.32 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heroku Django Starter Template
## How to Use
To use this project, follow these steps:
1. Create your working environment.
2. Install Django (`$ pip install django`)
3. Create a new project using this template
## Creating Your Project
Using this template to create a new Django app is easy::
$ django-admin.py startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile helloworld
(If this doesn't work on windows, replace `django-admin.py` with `django-admin`)
You can replace ``helloworld`` with your desired project name.
## Deployment to Heroku
$ git init
$ git add -A
$ git commit -m "Initial commit"
$ heroku create
$ git push heroku master
$ heroku run python manage.py migrate
## My helping commands
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh //download and install heroku cli
heroku --version
heroku login
mkdir myapp
cd myapp
heroku create
django-admin startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile myproject
source ../virenv/bin/activate
sudo apt-get install postgresql
sudo apt-get install python-psycopg2
sudo apt-get install libpq-dev
pip install -r requirements.txt
heroku local web //to run locallly
git add .
git commit -m "Added a Procfile."
heroku login
heroku create
git push heroku master
## Further Reading
- [Gunicorn](https://warehouse.python.org/project/gunicorn/)
- [WhiteNoise](https://warehouse.python.org/project/whitenoise/)
- [dj-database-url](https://warehouse.python.org/project/dj-database-url/)