-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (80 loc) · 2.71 KB
/
docker-compose.yml
File metadata and controls
84 lines (80 loc) · 2.71 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
services:
postgres:
image: postgres:13
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
volumes:
- postgres-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 10s
timeout: 5s
retries: 5
airflow-webserver:
build:
context: .
dockerfile: Dockerfile
env_file:
- ${HOME}/.env
environment:
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__FERNET_KEY=''
- AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION=True
- AIRFLOW__CORE__LOAD_EXAMPLES=False
- AIRFLOW__API__AUTH_BACKENDS=airflow.api.auth.backend.basic_auth
- SNOWFLAKE_PRIVATE_KEY_PATH=/opt/airflow/snowflake_rsa_key.p8
volumes:
- ./airflow/dags:/opt/airflow/dags
- ./airflow/logs:/opt/airflow/logs
- ./airflow/plugins:/opt/airflow/plugins
- ./pipelines:/opt/airflow/pipelines
- ./dbt:/opt/airflow/dbt
- ./data:/opt/airflow/data
- ./great_expectations:/opt/airflow/great_expectations
- ${HOME}/.env:/opt/airflow/.env
- /Users/jiufeng/Documents/project/snowflake-key/rsa_key.p8:/opt/airflow/snowflake_rsa_key.p8:ro
- ${HOME}/.kaggle:/root/.kaggle:ro
ports:
- "8080:8080"
command: ["airflow", "webserver"]
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 5
airflow-scheduler:
build:
context: .
dockerfile: Dockerfile
env_file:
- ${HOME}/.env
environment:
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__FERNET_KEY=''
- AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION=True
- AIRFLOW__CORE__LOAD_EXAMPLES=False
- SNOWFLAKE_PRIVATE_KEY_PATH=/opt/airflow/snowflake_rsa_key.p8
volumes:
- ./airflow/dags:/opt/airflow/dags
- ./airflow/logs:/opt/airflow/logs
- ./airflow/plugins:/opt/airflow/plugins
- ./pipelines:/opt/airflow/pipelines
- ./dbt:/opt/airflow/dbt
- ./data:/opt/airflow/data
- ./great_expectations:/opt/airflow/great_expectations
- ${HOME}/.env:/opt/airflow/.env
- /Users/jiufeng/Documents/project/snowflake-key/rsa_key.p8:/opt/airflow/snowflake_rsa_key.p8:ro
- ${HOME}/.kaggle:/root/.kaggle:ro
command: ["airflow", "scheduler"]
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-db-volume: