Skip to content

Instantly share code, notes, and snippets.

@ohld
Created February 3, 2021 13:43
Show Gist options
  • Save ohld/aa9bb626e1abea5310fa9ff1094ec16e to your computer and use it in GitHub Desktop.
Save ohld/aa9bb626e1abea5310fa9ff1094ec16e to your computer and use it in GitHub Desktop.
Deploy & Run Metabase in production using Dokku (with Postgres & https)
# Create Dokku app
dokku apps:create metabase
# Pull Metabase instance from Docker
docker pull metabase/metabase
# Create and link production Postgres
dokku postgres:create metabase
dokku postgres:link metabase metabase
# ⚠️ Copy-paste DATABASE_URL from output above and paste below:
dokku config:set metabase MB_DB_TYPE=postgres MB_DB_CONNECTION_URI=postgres://postgres:.....
# Because Metabase uses 3000 port
dokku proxy:ports-set metabase http:80:3000
# Let's letsencrypt it straight away
# You may be asked to specify your email for Letsencrypt
dokku letsencrypt metabase
# Retag Dokker to allow Dokku to understand everything
docker tag metabase/metabase:latest dokku/metabase:latest
# Deploy Metabase Instance
dokku tags:deploy metabase latest
# DONE open in browser: https://metabase.<yourdomain.com> to finish the setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment