Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment needs a persistent database #158

Merged
merged 4 commits into from
Nov 5, 2014
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ It's as simple as running this command, replacing `djangogirlsblog` with your ow

$ heroku create djangogirlsblog

Because our application needs a database, let's create a free [PostgreSQL](http://www.postgresql.org) instance on Heroku. It's as simple as running this command:

$ heroku addons:add heroku -postgresql --app djangogirlsblog

> In addition to creating a database for us, Heroku will also provide our application information on how to connect to the database. This information will be read and used by `dj_database_url.config()` in our `mysite/settings.py file`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this wrong? Heroku won't create a db for us, as you stated below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running this command will create it on Heroku... might have stated that differently, I agree
changed, thanks 😉


One more thing: let's install [heroku-push plugin](https://github.com/ddollar/heroku-push) by running this command:

$ heroku plugins:install https://github.com/ddollar/heroku-push
Expand All @@ -164,7 +170,7 @@ We can now visit the app in our browser with `heroku open`.

$ heroku open --app djangogirlsblog

One final step; Heroku created a new database for us but we also need to sync it:
One final step; we created a new database on Heroku, but we also need to sync it:

$ heroku run python manage.py migrate --app djangogirlsblog

Expand Down