Hot deploy on Heroku with no downtime
Posted
by zetarun
on Stack Overflow
See other posts from Stack Overflow
or by zetarun
Published on 2010-04-01T13:56:54Z
Indexed on
2010/04/01
14:23 UTC
Read the original article
Hit count: 308
A bad side of pushing to Heroku is that I must push the code (and the server restarts automatically) before running my db migrations.
This can obviously cause some 500 errors on users navigating the website having the new code without the new tables/attributes: the solution proposed by Heroku is to use the maintenance mode, but I want a way with no downside letting my webapp running everytime!
Is there a way? For example with Capistrano:
- I prepare the code to deploy in a new dir
- I run (backward) migrations and the old code continue to work perfectly
- I swith mongrel instance to the new dir and restart the server
...and I have no downtime!
© Stack Overflow or respective owner