-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
87 lines (87 loc) · 2.74 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
services:
oltp:
image: postgres
environment:
POSTGRES_DB: 'sales_oltp'
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
ports:
- 54320:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "sales_oltp"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
airflowdb:
image: postgres
environment:
POSTGRES_DB: 'airflow'
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
generator:
build:
context: .
dockerfile: ./generator/Dockerfile
args:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
volumes:
- ./import/csv/raw:/home/generator/csv
- ./import/xml/raw:/home/generator/xml
depends_on:
oltp:
condition: service_healthy
dw:
image: postgres
environment:
POSTGRES_DB: 'sales_dw'
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
ports:
- 54321:5432
volumes:
- ./import/csv:/import/csv
- ./import/xml:/import/xml
airflow:
build:
context: .
dockerfile: ./airflow/Dockerfile
restart: always
environment:
LOAD_EX: n
EXECUTOR: Local
AIRFLOW__CORE__FERNET_KEY: GmhP3ADRHscUZ2z_ohwMOmXlu5jFSI5IQRG0s-KrV_Y=
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@airflowdb:5432/airflow
AIRFLOW_CONN_SALES_DW: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@dw:5432/sales_dw"
AIRFLOW_CONN_SALES_OLTP: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@oltp:5432/sales_oltp
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: "False"
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./airflow/dags:/usr/local/airflow/dags
- ./import/csv:/import/csv
- ./import/xml:/import/xml
- ./dbt/dbt_company:/usr/local/airflow/dbt
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
depends_on:
generator:
condition: service_completed_successfully
superset:
build:
context: .
dockerfile: ./superset/Dockerfile
args:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
SUPERSET_ADMIN: $SUPERSET_ADMIN
SUPERSET_PASSWORD: $SUPERSET_PASSWORD
ports:
- "8088:8088"
command: gunicorn --bind "0.0.0.0:8088" --access-logfile '-' --error-logfile '-' --workers 1 --worker-class gthread --threads 20 --timeout 60 --limit-request-line 0 --limit-request-field_size 0 "superset.app:create_app()"
depends_on:
- airflow