
Continuous deployment with Heroku - craigkerstiens
http://neilmiddleton.com/continuous-deployment-with-heroku/
======
railsjedi
Tried this, it's not really possible because Heroku deploys restart the server
and make the site inaccessible for a few minutes (and often errors out
requests).

Hoping Heroku will fix what I consider a major bug. Until then, I've resigned
to having to redeploy to heroku in the middle of the night to avoid customers
getting pissed.

~~~
neilmiddleton
Personally, I don't see this. If you spend the time making sure that your
application spins up nice and fast then the only downtime is from when Heroku
decommissions the old version of your application and the new one starts up.

I'm generally only seeing a lag of a few seconds at most, and no lost
requests. I would look at your code and see what improvements you may be able
to make.

~~~
railsjedi
Most deployment allows for the site spin up independently before switching the
load balance to it to provide a seamless experience.

Even a very simple Rails sample app will often take over a minute to spin up
on heroku. I don't think it's smart to completely focus on server startup time
when the real fix is available on most other deployment environments.

That said, I still like Heroku and can deal with this for a while until they
fix it :)

------
ryanbrunner
Honestly, I find this article a little irresponsible. Continuous integration
is really one small part of deployment, and if you think you're ready to
deploy at any time just because your tests pass, you're setting yourself up
for some very painful lessons.

First off, there's currently no way to do a truly seamless deployment of code
on Heroku. The second your server starts, the dynos will switch over to your
new code, meaning that requests will queue while your environment loads. If
you have a lighting-fast booting Sinatra app, you might be OK, but for a Rails
app of any complexity there may be issues.

Secondly, without paying a LOT of attention to how backwards compatible your
code is, database migrations rarely fit well with a truly seamless deployment.

~~~
matlock
Hi Ryan,

you could deploy to your staging environment upon every build and only deploy
to production when triggered manually.

Railsonfire (full disclosure: I am one of the founders) makes this very easy.
Just give it a look here: [http://help.railsonfire.com/deployment/Heroku-
Deployment.htm...](http://help.railsonfire.com/deployment/Heroku-
Deployment.html)

You just have to set your branch for the production/staging environment and
only when you push to this specific branch the deployment will run.

If you need any help setting it up or have questions please send me an email
to flo@railsonfire.com

