-
Notifications
You must be signed in to change notification settings - Fork 24
Advanced Heroku deployment
This articles main purpose is to demonstrate how to deploy your application to Heroku so that you can easily keep up to date with your installation.
Heroku's one-click deploy button skips couple of things which are required to keep your installation up-to-date. The main thing missing is the git remote. You add it back with a command: git remote add origin https://github.com/9uuso/vertigo
. You will then need to pull the origin to update any changes made to master. To do that run git pull origin
.
Now your master branch will have the same git history as the main repository. To make Heroku aware of the earlier versions, push the changes by running git push heroku master
. Your application should then be updated and re-launched with the updates committed.
Heroku has written an article why SQLite is bad fit running on Heroku. The bottom line is that the changes you make in the website frontend will not be persistent and your posts and users will be destroyed at least once in a day.
Though there's a workaround if you really want to use Heroku and SQLite. It involves editing the .gitignore
file and removing vertigo.db
line from it. You can then create and make posts locally and then push the changes to Heroku. This requires that you do not have the PostgreSQL add-on enabled on your Heroku app, since otherwise it will be automatically preferred over SQLite. Another con is that the views will be reset every 24 hours, although you could fix this by using Google Analytics, for example.
I don't really recommend using SQLite on on Heroku aside from testing, because of the problems noted above.