Created
February 27, 2023 02:26
-
-
Save ferblape/76254fa4015c56cf46d2a1edb095f212 to your computer and use it in GitHub Desktop.
Install Metabase using Dokku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Previous steps ## | |
- Install Dokku package | |
- Setup the DNS of your domain | |
## Install Metabase ## | |
(run as root) | |
# install postgres plugin | |
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres | |
# install letsencrypt plugin | |
dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git | |
## Change to dokku user | |
su - dokku | |
## Postgres ## | |
# check commands | |
dokku postgres | |
# create metabase database | |
dokku postgres:create metabase | |
# database info | |
dokku postgres:info metabase | |
# enter | |
dokku postgres:enter metabase | |
# connect | |
dokku postgres:connect metabase | |
# expose service | |
dokku postgres:expose metabase 5432 | |
## Metabase ## | |
# create app | |
dokku apps:create metabase | |
# add git source | |
dokku git:from-image metabase metabase/metabase:latest | |
# link services | |
dokku postgres:link metabase metabase | |
# configure environment variables | |
dokku config:show metabase | |
# Docker configuration | |
https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker | |
dokku postgres:info metabase | |
# pick Dsn | |
# e.g. postgres://postgres:fe0cbeeb17559678f72c03d7878a1f67@dokku-postgres-metabase:5432/metabase | |
# setup env vars values | |
dokku config:set metabase MB_DB_TYPE=postgres | |
dokku config:set metabase MB_DB_CONNECTION_URI=<postgres Dsn> | |
# check environment variables | |
dokku config:show metabase | |
## Configure public access ## | |
# setup the domain | |
dokku domains:set metabase <my domain> | |
# configure let's encrypt email | |
dokku letsencrypt:set metabase email <my email> | |
# map ports | |
dokku proxy:ports-set metabase http:80:3000 https:443:3000 | |
# enable let's encrypt | |
dokku letsencrypt:enable metabase | |
## Logs ## | |
dokku logs metabase -t | |
## Review processes (optional) | |
dokku ps:scale metabase | |
dokku ps:rebuild metabase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment