-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
96 lines (91 loc) · 3.43 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: '3'
x-airflow-common:
&airflow-common
image: ${AIRFLOW_IMAGE_NAME:-ghcr.io/gestaogovbr/airflow2-docker:latest-dev}
pull_policy: always
environment:
&airflow-common-env
AIRFLOW__API__AUTH_BACKENDS: 'airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session'
AIRFLOW__CORE__DAGBAG_IMPORT_TIMEOUT: '120'
AIRFLOW__CORE__DAG_FILE_PROCESSOR_TIMEOUT: '180'
AIRFLOW__CORE__DEFAULT_TIMEZONE: 'America/Sao_Paulo'
AIRFLOW__CORE__ENABLE_XCOM_PICKLING: 'true'
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__CORE__FERNET_KEY: ${AIRFLOW__CORE__FERNET_KEY}
AIRFLOW__CORE__LOAD_EXAMPLES: 'false'
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://${POSTGRES_USER:-airflow}:${POSTGRES_PASSWORD:-airflow}@postgres/${POSTGRES_DB:-airflow}
AIRFLOW__DATAHUB__ENABLED: 'false'
AIRFLOW__EMAIL__DEFAULT_EMAIL_ON_FAILURE: 'false'
AIRFLOW__EMAIL__DEFAULT_EMAIL_ON_RETRY: 'false'
AIRFLOW__SCHEDULER__ENABLE_HEALTH_CHECK: 'true'
AIRFLOW__WEBSERVER__DEFAULT_UI_TIMEZONE: 'America/Sao_Paulo'
AIRFLOW__WEBSERVER__INSTANCE_NAME: "Let's Code!"
AIRFLOW__WEBSERVER__NAVBAR_COLOR: '#82f6ce'
AIRFLOW__WEBSERVER__SECRET_KEY: '42'
PYTHONPATH: '/opt/airflow/dags/airflow-dags:/opt/airflow/dags/airflow-dags-detru:/opt/airflow/dags/airflow-dags-delog'
RO_DOU__DAG_CONF_DIR: /opt/airflow/dags/airflow-dags/ro_dou/dag_confs
FASTETL_DEV: 'true'
volumes:
# cluster policy config
- ./config/airflow_local_settings.py:/opt/airflow/config/airflow_local_settings.py
# dags
- ../airflow-dags/dags:/opt/airflow/dags/airflow-dags
- ../airflow-dags-delog/dags:/opt/airflow/dags/airflow-dags-delog
- ../airflow-dags-detru/dags:/opt/airflow/dags/airflow-dags-detru
# plugins
- ../FastETL/fastetl:/opt/airflow/plugins/fastetl
- ../airflow_commons:/opt/airflow/plugins/airflow_commons
- ../Ro-dou/src:/opt/airflow/dags/ro_dou_src
# great expectations
- ../airflow-great-expectations:/opt/airflow/include/great_expectations
# logs
- ./mnt/logs:/opt/airflow/logs
# analytics-cginf (opcional - descomente abaixo)
# - ../analytics-cginf:/opt/airflow/include/great_expectations/notebooks/analytics-cginf
user: "${AIRFLOW_UID:-50000}:0"
depends_on:
&airflow-common-depends-on
postgres:
condition: service_healthy
services:
postgres:
image: ${POSTGRES_IMAGE_NAME:-postgres:15}
environment:
POSTGRES_USER: ${POSTGRES_USER:-airflow}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-airflow}
POSTGRES_DB: ${POSTGRES_DB:-airflow}
volumes:
- ${DB_VOLUME}
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 10s
retries: 5
start_period: 5s
restart: always
airflow-webserver:
<<: *airflow-common
command: webserver
ports:
- 8080:8080
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 10s
timeout: 10s
retries: 5
restart: always
airflow-scheduler:
<<: *airflow-common
command: scheduler
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
restart: always
jupyter:
<<: *airflow-common
user: "airflow:$AIRFLOW_UID"
command: bash -c "jupyter lab --port=8888 --no-browser --ip=0.0.0.0 --notebook-dir=/opt/airflow/include/great_expectations"
ports:
- 8888:8888