Skip to content

Commit 731657f

Browse files
fix: Set up a separate metabase postgres DB as a docker service
1 parent 7be3ac4 commit 731657f

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

analytics/docker-compose.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ services:
1515
MB_DB_DBNAME: metabase
1616
MB_DB_PORT: 5432
1717
MB_DB_USER: postgres
18-
MB_DB_PASS: ${MEMORY_STORE_PASSWORD:-julep_secure_password}
19-
MB_DB_HOST: memory-store
18+
MB_DB_PASS: ${METABASE_DB_PASSWORD:-metabase_secure_password}
19+
MB_DB_HOST: metabase-db
2020

2121
# Metabase settings
2222
MB_SITE_URL: https://${JULEP_HOST:-localhost}/analytics
@@ -34,5 +34,28 @@ services:
3434
retries: 3
3535
start_period: 60s
3636
depends_on:
37-
memory-store:
38-
condition: service_healthy
37+
metabase-db:
38+
condition: service_healthy
39+
40+
metabase-db:
41+
image: postgres:latest
42+
container_name: julep-metabase-db
43+
profiles:
44+
- multi-tenant
45+
hostname: metabase-db
46+
restart: unless-stopped
47+
volumes:
48+
- metabase-db-data:/var/lib/postgresql/data
49+
environment:
50+
- POSTGRES_USER=postgres
51+
- POSTGRES_DB=metabase
52+
- POSTGRES_PASSWORD=${METABASE_DB_PASSWORD:-metabase_secure_password}
53+
healthcheck:
54+
test: ['CMD-SHELL', 'pg_isready -U metabase -d metabaseappdb']
55+
interval: 10s
56+
timeout: 5s
57+
retries: 5
58+
59+
volumes:
60+
metabase-db-data:
61+
external: true

0 commit comments

Comments
 (0)