-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (51 loc) · 1.69 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
airflow-webserver:
image: custom-airflow:latest
depends_on:
- airflow-init
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: sqlite:////usr/local/airflow/airflow.db
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
AIRFLOW__WEBSERVER__WORKERS: 4
ports:
- "8080:8080"
command: webserver
volumes:
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
- ./airflow.db:/usr/local/airflow/airflow.db
airflow-scheduler:
image: custom-airflow:latest
depends_on:
- airflow-init
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: sqlite:////usr/local/airflow/airflow.db
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
command: scheduler
volumes:
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
- ./airflow.db:/usr/local/airflow/airflow.db
airflow-init:
image: custom-airflow:latest
entrypoint: /bin/bash -c \
"airflow db init && \
airflow users create \
--username admin \
--password admin \
--firstname Airflow \
--lastname Admin \
--role Admin \
--email admin@example.com"
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: sqlite:////usr/local/airflow/airflow.db
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
volumes:
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
- ./airflow.db:/usr/local/airflow/airflow.db