A production ready docker compose file to deploy Metabase. Please refer to the official Metabase documentation for usage instructions.
- 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)
- Clone the template somewhere sensible, i.e.
/srv/metabase
- Duplicate the .env.example file and rename it to .env
- Update the environment variables as needed
- Update
db_password.txt
,db_user.txt
andmb_key.txt
following the instructions in each file. - Run
docker compose up -d
to create or update the docker containers from the compose file - Run
docker compose down
to shut down the containers
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
Changes welcome! Please dont hesitate to open an issue if you spot a problem or make a pull request to propose an enhancement.