Skip to content

Dockerfile to run Metabase (business intelligence) on Dokku (mini-Heroku)

License

Notifications You must be signed in to change notification settings

d1ceward-on-dokku/metabase_on_dokku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Metabase Dokku Maintenance

Run Metabase on Dokku

Overview

This guide provides instructions on how to deploy Metabase, an open-source business intelligence tool, on a Dokku server using a custom Dockerfile.

Prerequisites

Before proceeding, ensure you have the following:

Setup Instructions

1. Create the App

Log into your Dokku host and create the metabase app:

dokku apps:create metabase

2. Configure the App

Install, Create, and Link PostgreSQL Plugin

  1. Install the PostgreSQL plugin:

    dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
  2. Create a PostgreSQL service:

    dokku postgres:create metabase
  3. Link the PostgreSQL service to the app:

    dokku postgres:link metabase metabase

3. Configure the Domain and Ports

Set the domain for your app to enable routing:

dokku domains:set metabase metabase.example.com

Map the internal port 3000 to the external port 80:

dokku proxy:ports-set metabase http:80:3000

4. Deploy the App

You can deploy the app to your Dokku server using one of the following methods:

Option 1: Deploy Using dokku git:sync

If your repository is hosted on a remote Git server with an HTTPS URL, you can deploy the app directly to your Dokku server using dokku git:sync. This method also triggers a build process automatically. Run the following command:

dokku git:sync --build metabase https://github.com/d1ceward-on-dokku/metabase_on_dokku.git

Option 2: Clone the Repository and Push Manually

If you prefer to work with the repository locally, you can clone it to your machine and push it to your Dokku server manually:

  1. Clone the repository:

    # Via SSH
    git clone git@github.com:d1ceward-on-dokku/metabase_on_dokku.git
    
    # Via HTTPS
    git clone https://github.com/d1ceward-on-dokku/metabase_on_dokku.git
  2. Add your Dokku server as a Git remote:

    git remote add dokku dokku@example.com:metabase
  3. Push the app to your Dokku server:

    git push dokku master

Choose the method that best suits your workflow.

7. Enable SSL (Optional)

Secure your app with an SSL certificate from Let's Encrypt:

  1. Add the HTTPS port:

    dokku ports:add metabase https:443:9000
  2. Install the Let's Encrypt plugin:

    dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
  3. Set the contact email for Let's Encrypt:

    dokku letsencrypt:set metabase email you@example.com
  4. Enable Let's Encrypt for the app:

    dokku letsencrypt:enable metabase

Wrapping Up

Congratulations! Your Metabase instance is now up and running. You can access it at https://metabase.example.com.

Happy data exploring!

About

Dockerfile to run Metabase (business intelligence) on Dokku (mini-Heroku)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks