forked from vfarah-if/ApacheAirflowExercise
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 1.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.09 KB
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
version: '2.1'
services:
postgres:
image: postgres
restart: always
container_name: postgres
ports:
- '32769:5432'
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
healthcheck:
test: ['CMD', 'pg_isready', '-q', '-d', 'airflow', '-U', 'airflow']
timeout: 45s
interval: 10s
retries: 10
volumes:
- ${PWD}/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
airflow:
build: ./docker/airflow
image: exercise1/airflow
restart: always
container_name: airflow
command: dockerize -wait tcp://postgres:5432 -timeout 120s ./start-airflow.sh
environment:
- AIRFLOW__CORE__FERNET_KEY="Z27wHAQxCObGWbIYyp06PlNoNlV7hyLO5zT74itoQww="
- AIRFLOW_VAR_DATA_PATH=/usr/local/airflow/data/
volumes:
- ./dags:/usr/local/airflow/dags
ports:
- 8080:8080
depends_on:
- postgres
healthcheck:
test: ['CMD', 'nc', '-z', 'airflow', '8080']
timeout: 45s
interval: 10s
retries: 10
networks:
default:
name: airflow-network