forked from xnuinside/airflow_in_docker_compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-volume-packages.yml
52 lines (52 loc) · 1.34 KB
/
docker-compose-volume-packages.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
version: "3"
services:
postgres:
image: "postgres:9.6"
container_name: "postgres"
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
ports:
- "5432:5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
# uncomment initdb if you need initdb at first run
initdb:
build: .
entrypoint: airflow initdb
depends_on:
- postgres
webserver:
build: .
restart: always
depends_on:
- postgres
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
- ./airflow_files/logs:/usr/local/airflow/logs
- ./airflow_files/packages:/usr/local/airflow/packages
ports:
- "8080:8080"
entrypoint: airflow webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
scheduler:
build: .
restart: always
depends_on:
- postgres
- webserver
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
- ./airflow_files/logs:/usr/local/airflow/logs
- ./airflow_files/packages:/usr/local/airflow/packages
entrypoint: airflow scheduler
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-scheduler.pid ]"]
interval: 30s
timeout: 30s
retries: 3