-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (32 loc) · 959 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (32 loc) · 959 Bytes
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
version: '3.8'
services:
db:
image: postgres:17.4
platform: linux/arm64/v8
container_name: northwind_db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./northwind_schema.sql:/docker-entrypoint-initdb.d/northwind_schema.sql
ports:
- "5432:5432" # Expose PostgreSQL on port 5432
metabase:
image: metabase/metabase
container_name: metabase
hostname: metabase
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: ${POSTGRES_DB}
MB_DB_PORT: 5432
MB_DB_USER: ${POSTGRES_USER}
MB_DB_PASS: ${POSTGRES_PASSWORD}
MB_DB_HOST: northwind_db # Link Metabase to the PostgreSQL container
ports:
- "3000:3000" # Expose Metabase on port 3000
depends_on:
- db
volumes:
postgres_data: # Define the volume globally