-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
72 lines (64 loc) · 1.54 KB
/
docker-compose.yaml
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
version: "2.1"
x-airflow-service: &airflow-service
image: puckel/docker-airflow:1.10.9
env_file: airflow_env
volumes:
- ./dags:/usr/local/airflow/dags
- ./sql:/usr/local/airflow/sql
- ./scripts:/usr/local/airflow/scripts
- ./dataset:/usr/local/airflow/dataset
- ./creds:/usr/local/airflow/creds
- ./requirements.txt:/requirements.txt
#- ./creds/kaggle.json:/usr/local/airflow/.kaggle/kaggle.json
restart: always
environment:
- LOAD_EX=n
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
services:
redis:
image: 'redis:5.0.5'
restart: always
postgres:
image: postgres:9.6
restart: always
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- ./pgdata:/var/lib/postgresql/data/pgdata
webserver:
<<: *airflow-service
depends_on:
- postgres
- redis
ports:
- "80:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
flower:
<<: *airflow-service
depends_on:
- redis
ports:
- "5555:5555"
command: flower
scheduler:
<<: *airflow-service
depends_on:
- webserver
command: scheduler
worker:
<<: *airflow-service
depends_on:
- scheduler
command: worker