-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.airflow-scaling-local.yml
80 lines (76 loc) · 2.4 KB
/
docker-compose.airflow-scaling-local.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
71
72
73
74
75
76
77
78
79
80
version: "3.8"
services:
######################################################
# DATASET
######################################################
dataset:
build: ./docker/dataset
image: dataength/dataset:skooldio
restart: always
container_name: dataset
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=breakfast
- PGDATA=/var/lib/postgresql/data/pgdata
######################################################
# DATABASE SERVICE
######################################################
airflow-metastore:
image: postgres:11.4-alpine
restart: always
container_name: airflow-metastore
volumes:
- ./mnt/postgres:/var/lib/postgresql/data/pgdata
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow_db
- PGDATA=/var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "airflow_db", "-U", "airflow"]
timeout: 45s
interval: 10s
retries: 10
######################################################
# AIRFLOW
######################################################
airflow:
build: ./docker/airflow
image: dataength/airflow:skooldio
restart: always
container_name: airflow
depends_on:
- airflow-metastore
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@airflow-metastore:5432/airflow_db
AIRFLOW__CORE__FERNET_KEY: "EMFOyePzhgJ1OOznc75nT6tWlq4Bk5Un3J8jgOyverQ="
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: "true"
AIRFLOW__CORE__LOAD_EXAMPLES: "false"
AIRFLOW__WEBSERVER__EXPOSE_CONFIG: "true"
volumes:
- ./mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg
- ./mnt/airflow/dags:/usr/local/airflow/dags
ports:
- 8080:8080
healthcheck:
test: ["CMD", "nc", "-z", "airflow", "8080"]
timeout: 45s
interval: 10s
retries: 10
######################################################
# EMAIL SERVICE
######################################################
mailhog:
image: mailhog/mailhog
container_name: mailhog
ports:
- "1025:1025"
- "8025:8025"
######################################################
# NETWORK
######################################################
networks:
default:
name: airflow-network