-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
27 lines (26 loc) · 773 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
27 lines (26 loc) · 773 Bytes
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
version: "3.8"
services:
postgres:
image: postgres:15
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- pgdata:/var/lib/postgresql/data
airflow:
image: apache/airflow:2.9.3
depends_on: [postgres]
environment:
- AIRFLOW__CORE__EXECUTOR=SequentialExecutor
- AIRFLOW__CORE__LOAD_EXAMPLES=False
volumes:
- ./airflow_dags:/opt/airflow/dags
- ./.env:/opt/airflow/.env
ports:
- "8080:8080"
command: bash -lc "airflow db init && airflow users create -u admin -p admin -r Admin -e admin@local -f Admin -l User && airflow webserver & airflow scheduler"
volumes:
pgdata: