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.
Servizi Inclusi
metabase
metabase/metabase:latest
Variabili d'Ambiente:
postgres
postgres:16-alpine
Variabili d'Ambiente:
YAML Generato
# 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
Informazioni Rapide
- Servizi
- 2
- Reti
- 1
- Volumi
- 1
Quando Usarlo
Questo template è ideale per configurare un ambiente metabase Tutti i servizi sono preconfigurati con healthchecks, limiti di risorse e valori predefiniti sensati. Personalizza le variabili d'ambiente prima di fare il deploy in produzione.
Consigli
- Cambia tutte le password predefinite prima del deploy
- Verifica i limiti di risorse per il tuo hardware
- Aggiungi un reverse proxy per HTTPS in produzione
- Configura strategie di backup per i volumi di dati