

Using “git push” to deploy Ruby applications to your own server - technicalfault
http://blog.bytemark.co.uk/2014/05/12/git-push-ruby-applications-dokku-server-bigv

======
elij
Deployments using source control probably aren't wise for most cases -- the
index, for the most part, is always growing.

~~~
vog
What about simply putting a "deploy" script into your main source directory?
Executing

    
    
        ./deploy
    

is even less work than "git push" into a special remote repository/branch.

This "deploy" script would execute RSync and whatever needed to update the
destination machine, without any server-side magic behind the scenes. It could
also execute "git push" so you don't have to remember to push before
deployment.

~~~
klauserc
IMO the neat thing about a "git push" deployment is that you are deploying a
particular commit.

The build server could annotate the build with the commit's hash, making that
deployment reproducible.

If you just have a local ./deploy script, a dev might deploy changes that
never make it into version control.

(Even if ./deploy forces the working copy to be clean and the index to be
empty, the dev could still "git reset --hard" afterwards and the version that
has been deployed is lot)

------
richardwhiuk
>>>> # Not currently on any branch.

>>>> nothing to commit (working directory clean)

>> This means we’re on the version of Dokku currently suggested for use with
Ubuntu 12.04 by its author.

No, it just means your on a detached head. Instead of git status, try:

    
    
      git tag --points-at HEAD

------
binocarlos
Dokku is awesome (as is Docker which it builds on). The guy that wrote it
(Jeff Lindsay) has been working on Flynn for the past 6 months -
[https://flynn.io/](https://flynn.io/) \- think of Flynn like a 'multi host
dokku'

~~~
csixty4
I love Dokku for my Node apps. Still trying to find a good setup for WordPress
installs that need to be able to upload media.

------
NicoJuicy
If anyone is interested, i just added the MS alternative (it's the engine for
Azure, but it's opensource and you can use it yourselve)

[https://news.ycombinator.com/item?id=7755914](https://news.ycombinator.com/item?id=7755914)

------
donw
I'm curious how this would handle rolling restarts (maybe a randomized delay
before deploying?) or rollbacks on failed deployments...

------
dkhenry
I have used git-deploy in many cases and it works great for any
language/framework combo

~~~
damian2000
[https://github.com/git-deploy/git-deploy](https://github.com/git-deploy/git-
deploy)

Interesting ... it says one of its main functions is the ease of reverting /
backing out of an install.

------
sytse
Very interesting, as GitLab B.V. CEO I'm very much looking forward to part 2
:-)

