the "host" part in MongoDB config is there for a reason
And no, NodeBB Docker image doesn't contain any database. You can see the dockerfile here - notice there is no mention of neither MongoDB, redis nor PostgreSQL. The choice of DB is left to you.
I don't think Docker should interfere with remote connections, so just changing mongodb/redis/PostgreSQL uri should work.
However, I'm not don't think that NodeBB can run serverless. It runs it own web server and uses websockets - so with Zeit small time limits even if you got NodeBB to run, the client would be reestablishing websocket connection every 10 seconds.
Going serverless seems great for apps that only need server-side processing occasionally. If you only can divide the app into small tasks that need to be done from time to time - for example every time the user requests a webpage.
Adapting NodeBB to work with Zeit Now, AWS Lambda, Google App Engine, Azure Functions or whichever serverless platform you want to use would require a lot of work. Socket.io would have to be replaced with something that supports serverless apps until a way to use it that way is added (I believe Zeit is working on this, but they are at it for some time now. And a lot of things would have to be moved away from NodeBB app itself to the selected serverless platform.
But I'm not really experienced with neither serverless nor docker, so I might've misunderstood something.