progrium/dokku — pull request #218 by alessiodm (2013-09-18 22:40:41+00:00)
Title: Issue #82: Hack on hack :)

There could be possible port conflicts between old dokku deploy and new dokku deploy (after reload) if a container of an app has taken a port already belonging to a different app. So it's better to stop all containers initially, and then proceed with all the deploys.
Finally, I found that calling too many dokku deploy one after the other causes the reload-nginx socket to be closed, so I wait 1s between deploys.
Hope this could be helpful before the final solution to issue #82.