forked from Cambalab/metabase-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (108 loc) · 3.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
115 lines (108 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: '3.9'
services:
db:
build:
context: .
dockerfile: 'Dockerfile-${DB_TYPE}'
args:
db_name: ${DB_NAME}
db_user: ${DB_USER}
db_password: ${DB_PASSWORD}
db_port: ${DB_PORT}
restart: always
volumes:
- type: volume
source: ${DB_OUTSIDE_VOLUME}
target: ${DB_INSIDE_VOLUME}
labels:
- "traefik.enable=false"
# adminer:
# image: adminer
# restart: always
# ports:
# - '5555:5555'
# depends_on:
# - 'db'
metabase:
image: metabase/metabase
restart: always
environment:
MB_DB_FILE: '${MB_DB_FILE}'
MB_DB_TYPE: '${DB_TYPE}'
MB_DB_DBNAME: '${DB_NAME}'
MB_DB_PORT: '${DB_PORT}'
MB_DB_USER: '${DB_USER}'
MB_DB_HOST: 'db'
MB_DB_PASS: '${DB_PASSWORD}'
JAVA_TIMEZONE: '${MB_JAVA_TIMEZONE}'
ports:
# <Port exposed>:<Port running inside container>
- '3000:3000'
volumes:
# Volumes where Metabase data will be persisted
- 'mb-data:/metabase-data'
depends_on:
- 'db'
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`metabase.localhost`)"
- "traefik.http.routers.whoami.entrypoints=web"
# traefik:
# build:
# context: .
# dockerfile: ./Dockerfile-traefik
# image: traefik
# environment:
# MB_PORT: ${MB_PORT}
# ADMINER_PORT: ${ADMINER_PORT}
# CERT_EMAIL: ${CERT_EMAIL}
# depends_on:
# - metabase
# volumes:
# - traefik:/etc/traefik/acme:z
# ports:
# - "0.0.0.0:80:80"
# - "0.0.0.0:${MB_PORT}:5556"
# - "0.0.0.0:${ADMINER_PORT}:5555"
traefik:
image: "traefik:v2.8"
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
# - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
# - "--entrypoints.web.http.redirections.entryPoint.scheme=https"
# - "--entrypoints.foo.http.redirections.entrypoint.permanent=true"
- "--entrypoints.websecure.address=:443"
# - --api=true
# - --api.dashboard=true
# - --api.debug=true
# - --providers.docker.endpoint=unix:///var/run/docker.sock
# - --providers.docker.swarmMode=true
# - --accesslog=false
- "--certificatesResolvers.letsencrypt.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesResolvers.letsencrypt.acme.tlsChallenge=true"
- "--certificatesresolvers.letsencrypt.acme.email=myemail@gmail.com"
- "--certificatesResolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
#- --certificatesResolvers.letsencrypt.acme.httpChallenge.entryPoint=web
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
# # Traefik Test Service:
# whoami:
# # A container that exposes an API to show its IP address
# image: traefik/whoami
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
# - "traefik.http.routers.whoami.entrypoints=web"
# # - "traefik.http.routers.whoami.entrypoints=websecure"
volumes:
db-data:
mb-data: