-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.airflow.yml
More file actions
85 lines (75 loc) · 1.79 KB
/
Copy pathdocker-compose.airflow.yml
File metadata and controls
85 lines (75 loc) · 1.79 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
84
85
---
version: "3.5"
x-airflow-common:
&airflow-common
build:
context: .
dockerfile: local_airflow/.Dockerfile
user: "${AIRFLOW_UID}:0"
env_file:
- local_airflow/common-airflow.env
volumes:
- ./local_airflow/dags:/opt/airflow/dags
- ./airflow_chat/plugins:/opt/airflow/plugins
x-airflow_depends_on:
&airflow-depends-on
depends_on:
postgres:
condition: service_healthy
airflow-init:
condition: service_completed_successfully
x-depends_on_database:
&depends-on-database
depends_on:
postgres:
condition: service_healthy
services:
redis:
image: 'redis:3.2.10'
networks:
- data-lake-network
scheduler:
<<: [*airflow-common,*airflow-depends-on]
container_name: airflow-scheduler
command: scheduler
restart: on-failure
networks:
- data-lake-network
ports:
- "8793:8793"
airflow-webserver:
<<: [*airflow-common, *airflow-depends-on]
container_name: airflow-webserver
restart: always
command: webserver
networks:
- data-lake-network
ports:
- "8088:8080"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 30s
timeout: 30s
retries: 5
airflow-init:
<<: *airflow-common
container_name: airflow-init
entrypoint: /bin/bash
command:
- -c
- |
mkdir -p /sources/logs /sources/dags /sources/plugins
chown -R "${AIRFLOW_UID}:0" /sources/{logs,dags,plugins}
exec /entrypoint airflow version
networks:
- data-lake-network
worker:
<<: [*airflow-common,*airflow-depends-on]
container_name: airflow-worker
command: celery worker
restart: on-failure
networks:
- data-lake-network
networks:
data-lake-network:
driver: bridge