@@ -8,8 +8,11 @@ services:
88 - public
99 - monitored
1010 environment:
11- # Metabase logsd doc: https://www.metabase.com/docs/v0.54/configuring-metabase/log-configuration
12- - JAVA_OPTS=-Dlog4j.configurationFile=file:/tmp/my_log4j2.xml
11+ # Avoid: site URL basename "/" does not match the actual basename
12+ # https://www.metabase.com/docs/latest/configuring-metabase/environment-variables#mb_site_url
13+ - MB_SITE_URL=https://${ADMIN_DOMAIN}/metabase/
14+ # Metabase logs: https://www.metabase.com/docs/v0.54/configuring-metabase/log-configuration
15+ - JAVA_OPTS=-Dlog4j.configurationFile=file:/etc/metabase/log4j2.xml
1316 # https://www.metabase.com/docs/v0.54/installation-and-operation/configuring-application-database
1417 - MB_DB_TYPE=postgres
1518 - MB_DB_DBNAME=metabase
@@ -19,9 +22,11 @@ services:
1922 - MB_DB_PASS=${METABASE_POSTGRES_PASSWORD}
2023 # https://www.metabase.com/docs/v0.54/installation-and-operation/running-metabase-on-docker#setting-the-java-timezone
2124 - JAVA_TIMEZONE=UTC
25+ # https://www.metabase.com/docs/latest/installation-and-operation/observability-with-prometheus
26+ - MB_PROMETHEUS_SERVER_PORT=9191
2227 deploy:
23- # we do not need high availability. This service is not critical
24- replicas: 1
28+ # https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation/metabase-at-scale
29+ replicas: ${METABASE_REPLICAS}
2530 update_config:
2631 parallelism: 1
2732 order: start-first
@@ -31,6 +36,10 @@ services:
3136 constraints:
3237 - node.labels.ops==true
3338 labels:
39+ # prometheus only keeps jobs with `prometheus-job` label
40+ - prometheus-job=metabase
41+ # Set in `MB_PROMETHEUS_SERVER_PORT` environment variable
42+ - prometheus-port=9191
3443 # TODO: add prometheus metrics
3544 - traefik.enable=true
3645 - traefik.docker.network=${PUBLIC_NETWORK}
@@ -61,7 +70,7 @@ services:
6170 retries: 5
6271 configs:
6372 - source: logging_configuration
64- target: /tmp/my_log4j2 .xml
73+ target: /etc/metabase/log4j2 .xml
6574
6675configs:
6776 logging_configuration:
0 commit comments