-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-LocalExecutor.yml
51 lines (48 loc) · 2.05 KB
/
docker-compose-LocalExecutor.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
version: '3.8'
services:
postgres:
image: postgres:9.6
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
mysql:
image: mysql:5.7.27
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./store_files:/store_files_mysql/ # same location is added to airflow container
- ./store_files:/var/lib/mysql-files # adding local file to sql-container
- ./mysql.cnf:/etc/mysql/mysql.cnf #new line
webserver:
image: puckel/docker-airflow:1.10.4
restart: no
depends_on:
- postgres
- mysql #new line
environment:
- INSTALL_MYSQL=y #new line
- LOAD_EX=n
- EXECUTOR=Local
# - AIRFLOW__CORE__SQL_ALCHEMY_CONN=mysql+mysqlconnector://root:root@mysql/airflow
# - AIRFLOW__CORE__RESULT_BACKEND=db+mysql://root:root@mysql/airflow
- AIRFLOW__SMTP__SMTP_HOST=smtp.gmail.com #new lines
- AIRFLOW__SMTP__SMTP_PASSWORD=vsxalofzluwjvebh #app_password- to use it for this app
- AIRFLOW__SMTP__SMTP_PORT=587
- AIRFLOW__SMTP__SMTP_MAIL_FROM=Airflow
volumes:
- ./dags:/usr/local/airflow/dags
- ./store_files:/usr/local/airflow/store_files_airflow # same location is added to airflow container.. any file created reflects here
- ./sql_files:/usr/local/airflow/sql_files #new line
# - ./store_files:/store_files_mysql/ #new line to check if now the insert stmt works
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3