musicglue/dokku — pull request #1 by leemhenson (2013-11-07 14:40:54+00:00)
Title: added nginx port control commands

I wanted to do some debugging inside one of my apps, but it doesn't appear to be possible to attach to a running container in docker and get hold of a new bash session. I've added a couple of new nginx plugin commands that make it possible to temporarily reroute the nginx vhost to a different upstream. Now I can ```docker run ... /exec /bin/bash``` up a new container on a new port, boot the app in the background, and hot swap it into my app with:

```dokku nginx:use-new-port my-app 49999```

Now I've got a bash session for a running app that I can debug in-place. Once I've finished with it:

```dokku nginx:use-default-port my-app```

to return the original upstream container.