Skip to content

Commit f2baefc

Browse files
committed
Merge pull request DjangoGirls#158 from goranche/master
Deployment needs a persistent database
2 parents 0ce7d84 + 77a8bb1 commit f2baefc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

deploy/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ It's as simple as running this command, replacing `djangogirlsblog` with your ow
141141

142142
$ heroku create djangogirlsblog
143143

144+
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:
145+
146+
$ heroku addons:add heroku-postgresql --app djangogirlsblog
147+
148+
> In addition to creating a database for us, this command will also configure our application with the 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`.
149+
144150
One more thing: let's install [heroku-push plugin](https://github.com/ddollar/heroku-push) by running this command:
145151

146152
$ heroku plugins:install https://github.com/ddollar/heroku-push
@@ -166,7 +172,7 @@ We can now visit the app in our browser with `heroku open`.
166172

167173
$ heroku open --app djangogirlsblog
168174

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

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

0 commit comments

Comments
 (0)