forked from ahnsv/airflow-ecs-codedeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (66 loc) · 1.76 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
version: '3.8'
x-common-variables: &common-variables
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=${AIRFLOW__CORE__SQL_ALCHEMY_CONN}
- AIRFLOW__CORE__EXECUTOR=${AIRFLOW__CORE__EXECUTOR}
- AIRFLOW__CELERY__BROKER_URL=${AIRFLOW__CELERY__BROKER_URL}
- AIRFLOW__CELERY__RESULT_BACKEND=${AIRFLOW__CELERY__RESULT_BACKEND}
- AIRFLOW__FERNET_KEY=${AIRFLOW__FERNET_KEY}
- AIRFLOW__CORE__LOAD_EXAMPLES=${AIRFLOW__CORE__LOAD_EXAMPLES}
services:
postgres:
image: postgres:12-alpine
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
redis:
image: 'redis:5.0.5'
command: redis-server --requirepass redispass
scheduler:
image: airflow-ecs:latest
command: scheduler
restart: always
depends_on:
- postgres
environment: *common-variables
volumes:
- ./dags:/usr/local/airflow/dags
- ./logs:/usr/local/airflow/logs
webserver:
image: airflow-ecs:latest
entrypoint: scripts/entrypoint.sh
restart: always
depends_on:
- postgres
- scheduler
environment: *common-variables
volumes:
- ./dags:/usr/local/airflow/dags
- ./logs:/usr/local/airflow/logs
- ./scripts:/usr/local/airflow/scripts
ports:
- "8080:8080"
worker:
image: airflow-ecs:latest
restart: always
deploy:
replicas: 3
depends_on:
- scheduler
environment: *common-variables
volumes:
- ./dags:/usr/local/airflow/dags
- ./logs:/usr/local/airflow/logs
- ./scripts:/usr/local/airflow/scripts
command: worker
flower:
image: airflow-ecs:latest
restart: always
depends_on:
- redis
environment:
- EXECUTOR=Celery
- REDIS_PASSWORD=redispass
ports:
- "5555:5555"
command: flower