/metabase-compose

A docker compose file to deploy a production ready Metabase instance

MIT LicenseMIT

About

A production ready docker compose file to deploy Metabase. Please refer to the official Metabase documentation for usage instructions.

The compose file uses the following images:

  • Metabase – self-service BI reporting tool
  • Postgres – database server used by the Metabase application
  • Traefik – a reverse proxy that sits in front of Metabase and provides SSL termination (and generates Let's Encrypt certificates)

⚠️ Docker images are continuously updated so please check the version tags and decide if a newer version of the container would be more appropriate for your use case.

Requires:

Getting started

  1. Clone the template somewhere sensible, i.e. /srv/metabase
  2. Duplicate the .env.example file and rename it to .env
  3. Update the environment variables as needed
  4. Update db_password.txt, db_user.txt and mb_key.txt following the instructions in each file.
  5. Run docker compose up -d to create or update the docker containers from the compose file
  6. Run docker compose down to shut down the containers
  7. Ensure DNS is pointed correctly and you have ports 80 and 443 open on your firewall

Available environment variables

MB_DBNAME: name of the database

MB_HOST: the public URL that people will access Metabase from (assumes DNS is pointed correctly)

LE_EMAIL: for expiry notices when your Let's Encrypt certificate is coming up for renewal

Contributing

Changes welcome! Please dont hesitate to open an issue if you spot a problem or make a pull request to propose an enhancement.