-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (59 loc) · 2.03 KB
/
docker-compose.yml
File metadata and controls
60 lines (59 loc) · 2.03 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
services:
dbt:
build:
context: .
dockerfile: Dockerfile
container_name: dbt-erd-demo
volumes:
# Mount project files
- ./models:/usr/app/dbt/models
- ./seeds:/usr/app/dbt/seeds
- ./target:/usr/app/dbt/target
- ./assets:/usr/app/dbt/assets
- ./dbt_project.yml:/usr/app/dbt/dbt_project.yml
- ./profiles.yml:/usr/app/dbt/profiles.yml
- ./packages.yml:/usr/app/dbt/packages.yml
# DuckDB database file will be created automatically in container
ports:
# Expose dbt docs server
- "8080:8080"
working_dir: /usr/app/dbt
command: >
bash -c "
echo '========================================' &&
echo 'dbt-model-erd Demo - Starting...' &&
echo '========================================' &&
echo '' &&
echo 'Step 1: Installing dbt packages...' &&
dbt deps &&
echo '' &&
echo 'Step 2: Loading seed data...' &&
dbt seed &&
echo '' &&
echo 'Step 3: Running dbt models...' &&
dbt run &&
echo '' &&
echo 'Step 4: Running dbt tests...' &&
dbt test &&
echo '' &&
echo 'Step 5: Generating ERD diagrams...' &&
python -m dbt_erd --model-path models/dw/fact &&
echo '' &&
echo 'Step 6: Generating dbt documentation...' &&
dbt docs generate &&
echo '' &&
echo '========================================' &&
echo '✓ All tasks completed successfully!' &&
echo '========================================' &&
echo '' &&
echo 'Starting dbt docs server...' &&
echo 'Visit http://localhost:8080 in your browser' &&
echo '' &&
echo 'ERD diagrams available at:' &&
echo ' - assets/img/models/dw/fact/fact_orders_model.html' &&
echo ' - assets/img/models/dw/fact/fact_sales_model.html' &&
echo '' &&
echo 'Press Ctrl+C to stop' &&
echo '========================================' &&
dbt docs serve --port 8080
"