Running multiple services on Dokku

submited by
Style Pass
2022-10-01 09:00:10

Dokku makes it very easy to deploy and run simpler web apps. Recently, I had to deploy a slightly more complex web app with multiple non-web worker services talking to each other. It’s surprisingly simple to get make this work.

The web app itself is built using Django, so Dokku deploys it using the Python buildpack. Let’s call this service W for web worker.

There is also Postgres, Redis, a Celery beat and Celery worker processes. I consider these services to be part of a simple web app since they are straightforward to set up using Dokku.

Luckily, Dokku supports multiple buildpacks. Dokku just needs some markers that say it’s a Python and Go project. Having initialized Dokku using Python, I can simply add Go:

The services A and B run different Go executables compiled from the same code base. Dokku knows how to build a project with go.mod file by compiling all the main.go binaries.

Great! This is how to deploy multiple Processes using different tech stacks with Dokku. Let’s make them talk to each other.

Leave a Comment