-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (58 loc) · 1.21 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
version: '3.8'
services:
source_postgres:
image: postgres:latest
ports:
- "5435:5432"
networks:
- elt_networks
environment:
POSTGRES_DB: source_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secret
volumes:
- ./source_db_init/init_sql:/docker-entrypoint-initdb.d
destination_postgres:
image: postgres:latest
ports:
- "5434:5432"
networks:
- elt_networks
environment:
POSTGRES_DB: destination_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secret
elt_script:
build:
context: ./elt
dockerfile: Dockerfile
command: ["python", "elt_script.py"]
networks:
- elt_networks
depends_on:
- source_postgres
- destination_postgres
dbt:
image: ghcr.io/dbt-labs/dbt-postgres:1.4.7
command:
[
"run",
"--profiles-dir",
"/root",
"--project-dir",
"/dbt",
"--full-refresh"
]
networks:
- elt_networks
volumes:
- ./custom_postgres:/dbt
- ~/.dbt:/root
depends_on:
- elt_script
environment:
DBT_PROFILE: default
DBT_TARGET: dev
networks:
elt_networks:
driver: bridge