How to deploy nodeBB on Digital Ocean Ubuntu with Docker

Maybe I'll make this a bit more detailed later, but I'm mainly documenting it for myself.
Also I wish people would think of automated deployment when writing software FFS!
If your pretty web install is the only way to install then it is an impediment to automated deploys! (I know nodebb has a cli install, but it was behaving badly with docker anyway)
I could run it by putting in a pre-made config file, but then it would skip populating the database -____-
Anyway here are the steps that worked for me:

  1. Get a droplet with docker pre-installed
  2. The usual setting up of ssh stuff
  3. git clone https://github.com/doppioslash/docker-builds
  4. put the url you want in the ubuntu dir Dockerfile: CMD url=<your url>:80
  5. make a repo on http://hub.docker.com, I suggest to call it <yourname>/nodebb
  6. on the machine you have the Dockerfile docker build -t <yourrepo>/nodebb:ubuntu .
  7. and then docker push <yourrepo>/nodebb
  8. on your droplet: docker pull <yourrepo>/nodebb:ubuntu
  9. also docker pull doppioslash/redis:ubuntu for the Redis db
  10. run the Redis image with docker run --name <yourforum>-forum-redis -d -p 6379:6379 doppioslash/redis:ubuntu
  11. run the nodebb image you made with docker run --name <yourforum>-forum-nodebb --link <yourforum>-forum-redis:redis -p 80:80 -p 443:443 -p 4567:4567 -P -t -i <yourrepo>/nodebb:ubuntu
  12. connect with the web installer at :4567
  13. fill in everything and press install
  14. CTRL-C so that closes and then docker ps -a
  15. grab the ID of your nodebb container and docker start <yourID>
  16. you should now be able to connect to <yoururl> without specifying any ports.

Hopefully that worked! If not feel free to comment or ping me on twitter.