-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose-airflow2.yml
60 lines (58 loc) · 1.51 KB
/
docker-compose-airflow2.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
version: "2.1"
services:
postgres:
image: postgres:12
restart: always
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
ports:
- "5432:5432"
volumes:
- ./demo/scripts/load_postgres.sql:/docker-entrypoint-initdb.d/load_postgres.sql
- ./demo/pg-data:/var/lib/postgresql/data
scheduler:
build:
context: .
dockerfile: ./Dockerfile-airflow2
restart: always
depends_on:
- postgres
- webserver
env_file:
- ./demo/.env
ports:
- "8793:8793"
volumes:
- ./demo/dags:/opt/airflow/dags
- ./demo/airflow-logs:/opt/airflow/logs
- ./demo/scripts:/opt/airflow/scripts
entrypoint: ["bash", "./scripts/local-entrypoint-scheduler.sh"]
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
webserver:
build:
context: .
dockerfile: ./Dockerfile-airflow2
hostname: webserver
restart: always
depends_on:
- postgres
env_file:
- ./demo/.env
volumes:
- ./demo/dags:/opt/airflow/dags
- ./demo/scripts:/opt/airflow/scripts
- ./demo/airflow-logs:/opt/airflow/logs
ports:
- "8080:8080"
entrypoint: ["bash", "./scripts/local-entrypoint-webserver.sh", "Airflow2"]
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 32