How to Run Metabase on Dokku
Motivation
Why Dokku?
I’ve launched a lot of indie projects and I always struggle with several things. One of them was DevOps: I am a perfectionist with a good sense of shitcode and crutches. I used to have a lot of bash scripts that helped me with deploying all my stuff — I hate this approach because It looks very manual for me. I wanted to automate everything. And I was incredibly happy when I discovered Heroku — it outsourced all DevOps tasks including auto-deploy-after-you-pushed-code-to-GitHub-master-branch. It was amazing.
When the projects became popular and the size of the free tier appeared to be not enough for me, I took a look at Heroku prices and was a little bit shocked.
Then I started to look for Heroku alternatives and found out Dokku: Heroku’s open-source clone. If your project is already configured to run successfully on Heroku (e.g. my Python Django app should have Procfile
,requirements.txt
and use environment variables)— it is ready to be deployed to Dokku (you will probably also need the DOKKU_SCALE file to simplify several process deployments).
Why Metabase?
I don’t have the experience in frontend to visualize some numbers taken from my Postgres database. I used Telegram bots to broadcast product metrics to me and my colleague but this is shitcode also (in my opinion).
I have experience in BigData — and it has the same problem: you need a tool that can visualize your data. Moreover, you will probably need a Business Intelligence (BI) to allow non-coders (e.g. CEO of your company) to see and build graphs by his/her own (please, don’t force him/her to study SQL).
Recently I found the Metabase. Basically it is just a frontend to your database. You press buttons — it generates SQLs under the hood — and show you your project analysis. Just try it! (this is not an advertisement by the way)
How to Install Metabase on Dokku
I added the comments to describe each terminal line — read the Gist below:
This is how I managed to install Metabase on Dokku. I had some problems with my DNS and ports (because you need to open the :3000
port of Metabase app to set it up).
Thanks for reading!
P.S. This is not an advertisement of Metabase — I just trying to post something useful on Medium to gain followers. So please clap and follow me!