Sometimes you need to apply a change on all of your CouchDB documents. I actually needed to remove an old and unused property from all of them. CouchDB conceptually doesn’t allow you to update a document without knowing its revision, so you would end up reading all your documents, modify them and update them one by one. Sounds nice, eh? update handlers There’s a better way, though. CouchDB has a concept of Document Update Handlers, which are saved in the database’s design document and are accessible through the HTTP API.
Playing around with docker running inside a Vagrant VM and trying to use some services being exposed via HTTP ports makes you ask how to automatically forward the exposed docker ports through Vagrant to the host system. phew I found an already merged pull request, which looked like what I wanted. So, after a peek into the docker Vagrant file I tried to expose a CouchDB port to the host system like this: