No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-26 19:55:39 +00:00
.gitea/workflows feat: added gittea pipeline 2026-04-26 21:55:29 +02:00
defaults feat: added uninstall mode 2026-04-22 20:02:45 +02:00
meta feat: added first version 2026-04-22 19:20:40 +02:00
tasks feat: added uninstall mode 2026-04-22 20:02:45 +02:00
templates fix: added restart policy 2026-04-24 07:58:10 +02:00
.gitignore feat: added first version 2026-04-22 19:20:40 +02:00
CHANGELOG.md Prettified Code! 2026-04-26 19:55:39 +00:00
LICENSE fix: fixed company name in license 2026-04-22 19:21:37 +02:00
README.md Prettified Code! 2026-04-26 19:55:39 +00:00

Metabase

Deploys a Metabase instance via Docker Compose, optionally with a managed Postgres database and Traefik reverse proxy integration.

Requirements

  • Docker
  • community.docker Ansible collection

Variables

Variable Default Description
metabase_instance metabase Unique instance name. Used as Compose project name and container name prefix. Change when running multiple instances on the same host.
metabase_version latest Metabase image tag. Pin to a specific version in production.
metabase_path /data/metabase Host path for Postgres data.
metabase_docker_path /docker/metabase Host path for the docker-compose.yml file.
metabase_port ~ Host port to expose Metabase on. Leave null when using Traefik.
metabase_domain ~ Domain for Traefik routing. When set, adds Traefik labels and joins the traefik_web network.
metabase_pg_enabled true Deploy a managed Postgres container. Set to false to use an external database.
metabase_pg_version 18-alpine Postgres image tag. If changed, verify the internal UID with docker run --rm postgres:<tag> id postgres and update directory ownership accordingly.
metabase_uninstall false Stops and removes containers and the compose directory.
metabase_purge false Also removes the data directory. Requires metabase_uninstall: true. Irreversible.
metabase_pg_db metabaseappdb Postgres database name.
metabase_pg_user metabase Postgres user.
metabase_pg_pass ~ Postgres password. Required when metabase_pg_enabled is true.
metabase_pg_port 5432 Postgres port (internal, not exposed to host).

Usage

Minimal setup with port exposure:

metabase_pg_pass: "supersecret"
metabase_port: 3000

Multiple instances on the same host:

# instance 1
metabase_instance: metabase_customer_a
metabase_port: 3000
metabase_pg_pass: "secret_a"
metabase_path: /data/metabase_customer_a

# instance 2
metabase_instance: metabase_customer_b
metabase_port: 3001
metabase_pg_pass: "secret_b"
metabase_path: /data/metabase_customer_b

With Traefik:

metabase_pg_pass: "supersecret"
metabase_domain: "metabase.example.com"

Uninstall

To stop and remove all containers and the compose directory:

metabase_uninstall: true

To also wipe the Postgres data directory (irreversible):

metabase_uninstall: true
metabase_purge: true

Notes

  • Postgres data directory is owned by 70:70 (UID/GID of postgres:18-alpine). If you change metabase_pg_version, verify the UID and re-run the role before starting the container.
  • Postgres is not exposed to the host — it is only reachable by the Metabase container on the internal Compose network.
  • If neither metabase_port nor metabase_domain is set, the role will warn but not fail.