-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (65 loc) · 1.67 KB
/
docker-compose.yml
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
version: '3.8'
networks:
metabase-internal:
dbt-metabase:
services:
metabase:
image: metabase/metabase:v0.50.6
# image: metabase/metabase:latest
hostname: metabase
container_name: metabase
restart: always
volumes:
- /dev/urandom:/dev/random:ro
ports:
- "3000:3000"
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase
MB_DB_PORT: 5432
MB_DB_USER: ${MB_POSTGRES_USER}
MB_DB_PASS: ${MB_POSTGRES_PASSWORD}
MB_DB_HOST: metabase-postgres
networks:
- metabase-internal
- dbt-metabase
healthcheck:
test: curl --fail -I http://localhost:3000/api/health || exit 1
interval: 15s
timeout: 5s
retries: 50
depends_on:
- metabase-postgres
# metabase backend database
metabase-postgres:
image: postgres:15.2
hostname: metabase-postgres
container_name: metabase-postgres
restart: always
environment:
POSTGRES_USER: ${MB_POSTGRES_USER}
POSTGRES_PASSWORD: ${MB_POSTGRES_PASSWORD}
POSTGRES_DB: metabase
volumes:
- ./metabase/postgres-data:/var/lib/postgresql/data
ports:
- ${MB_POSTGRES_PORT}:5432
networks:
- metabase-internal
#postgres as database to store data model
postgresql:
image: postgres:15.2
hostname: postgresql
container_name: db-postgres
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres
volumes:
- ./postgres-data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
ports:
- ${POSTGRES_PORT}:5432
networks:
- dbt-metabase