forked from puckel/docker-airflow
-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose-CeleryExecutor.yml
122 lines (115 loc) · 3.22 KB
/
docker-compose-CeleryExecutor.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '2.2'
services:
redis:
image: 'redis:5.0.5'
command: [
"bash", "-c",
'
docker-entrypoint.sh
--requirepass $${REDIS_PASSWORD}
'
]
restart: always
env_file:
- secrets/redis.env
postgres:
image: postgres:9.6
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- PGDATA=${DB_VOLUME_CONTAINER}
env_file:
- secrets/postgres.env
volumes:
- "db:${DB_VOLUME_CONTAINER}"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 30s
timeout: 30s
retries: 3
webserver:
image: ednarb29/docker-airflow:2.2.3
restart: always
depends_on:
- postgres
- redis
environment:
- LOAD_EX=n
- EXECUTOR=Celery
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
env_file:
- secrets/fernet_key.env
- secrets/redis.env
- secrets/postgres.env
volumes:
- "./dags:${AIRFLOW_DAG_DIR}"
# - "./plugins:${AIRFLOW_PLUGINS_DIR}"
- "./files:${AIRFLOW_FILES_DIR}"
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
flower:
image: ednarb29/docker-airflow:2.2.3
restart: always
depends_on:
- redis
environment:
- EXECUTOR=Celery
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
env_file:
- secrets/redis.env
- secrets/postgres.env
ports:
- "5555:5555"
command: celery flower
scheduler:
image: ednarb29/docker-airflow:2.2.3
restart: always
depends_on:
- webserver
volumes:
- "./dags:${AIRFLOW_DAG_DIR}"
# - "./plugins:${AIRFLOW_PLUGINS_DIR}"
- "./files:${AIRFLOW_FILES_DIR}"
environment:
- LOAD_EX=n
- EXECUTOR=Celery
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
env_file:
- secrets/fernet_key.env
- secrets/redis.env
- secrets/postgres.env
command: scheduler
worker:
image: ednarb29/docker-airflow:2.2.3
restart: always
depends_on:
- scheduler
volumes:
- "./dags:${AIRFLOW_DAG_DIR}"
# - "./plugins:${AIRFLOW_PLUGINS_DIR}"
- "./files:${AIRFLOW_FILES_DIR}"
environment:
- EXECUTOR=Celery
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
env_file:
- secrets/fernet_key.env
- secrets/redis.env
- secrets/postgres.env
command: celery worker
volumes:
db:
# networks:
# default:
# external:
# name: "${DOCKER_NETWORK_NAME}"