Metabase
Metabase is an open-source business intelligence tool that lets anyone in your organization ask questions about data and visualize the answers as charts, dashboards, and reports. It supports connecting to dozens of databases including PostgreSQL, MySQL, MongoDB, BigQuery, Snowflake, Redshift, and many more. This stack deploys Metabase backed by PostgreSQL 16 as its application database for storing questions, dashboards, collections, and user data. Metabase provides a visual query builder that requires no SQL knowledge, a native SQL editor for advanced users, automatic data modeling, alerts, subscriptions, and embedding support. It features row-level security, SSO integration (SAML, JWT, LDAP), and a powerful API for programmatic access. After deployment, access the web UI on port 3000 to complete the setup wizard, connect your data sources, and start creating dashboards.
Enthaltene Services
metabase
metabase/metabase:latest
Umgebungsvariablen:
postgres
postgres:16-alpine
Umgebungsvariablen:
Generiertes YAML
# Generated by ComposeHub (composehub.dev)
name: metabase
services:
metabase:
image: metabase/metabase:latest
restart: always
ports:
- 3000:3000
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: ${POSTGRES_DB:-metabase}
MB_DB_PORT: "5432"
MB_DB_USER: ${POSTGRES_USER:-metabase}
MB_DB_PASS: ${POSTGRES_PASSWORD:-changeme}
MB_DB_HOST: postgres
MB_SITE_URL: ${MB_SITE_URL:-http://localhost:3000}
JAVA_OPTS: ${JAVA_OPTS:--Xmx1g}
networks:
- metabase
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:3000/api/health || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
deploy:
resources:
limits:
cpus: "2.00"
memory: 2048M
reservations:
cpus: "0.50"
memory: 512M
labels:
com.composehub.description: Metabase business intelligence and analytics server
postgres:
image: postgres:16-alpine
restart: always
volumes:
- metabase_db:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${POSTGRES_DB:-metabase}
POSTGRES_USER: ${POSTGRES_USER:-metabase}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
networks:
- metabase
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER:-metabase} -d ${POSTGRES_DB:-metabase}
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
labels:
com.composehub.description: PostgreSQL 16 application database for Metabase
networks:
metabase:
driver: bridge
volumes:
metabase_db:
driver: local
Kurzinfo
- Services
- 2
- Netzwerke
- 1
- Volumes
- 1
Wann verwenden
Dieses Template ist ideal für die Einrichtung einer metabase Umgebung. Alle Services sind mit Healthchecks, Ressourcenlimits und sinnvollen Standardwerten vorkonfiguriert. Passen Sie die Umgebungsvariablen an, bevor Sie in Produktion gehen.
Tipps
- Ändern Sie alle Standardpasswörter vor dem Deployment
- Überprüfen Sie die Ressourcenlimits für Ihre Hardware
- Fügen Sie einen Reverse Proxy für HTTPS in Produktion hinzu
- Konfigurieren Sie Backup-Strategien für Daten-Volumes