2023-06-21 16:02:12 +02:00
|
|
|
---
|
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
x-airflow-common:
|
|
|
|
&airflow-common
|
2023-06-25 20:53:51 +02:00
|
|
|
build: ./airflow_img
|
2023-06-21 16:02:12 +02:00
|
|
|
volumes:
|
2023-06-21 19:12:03 +02:00
|
|
|
- ./state/airflow-data:/home/airflow/airflow
|
2023-06-25 20:53:51 +02:00
|
|
|
- ./state/dbt-data/logs:/dbt/logs
|
|
|
|
- ./state/dbt-data/target:/dbt/target
|
2023-06-21 19:12:03 +02:00
|
|
|
- ./dags:/home/airflow/airflow/dags
|
2023-06-24 19:07:02 +02:00
|
|
|
- ./data:/home/airflow/gcs/data:ro
|
|
|
|
- ./etl:/etl:ro
|
2023-06-25 20:53:51 +02:00
|
|
|
- ./dbt:/dbt
|
2023-06-21 16:02:12 +02:00
|
|
|
environment:
|
|
|
|
AIRFLOW__CORE__LOAD_EXAMPLES: 'false'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
airflow-init:
|
|
|
|
<<: *airflow-common
|
|
|
|
restart: "no"
|
|
|
|
entrypoint: /usr/local/bin/airflow-init.sh
|
|
|
|
|
|
|
|
airflow-scheduler:
|
|
|
|
<<: *airflow-common
|
2023-06-25 20:53:51 +02:00
|
|
|
command: scheduler
|
|
|
|
restart: "unless-stopped"
|
2023-06-21 16:02:12 +02:00
|
|
|
depends_on:
|
|
|
|
airflow-init:
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
|
|
|
airflow-webserver:
|
|
|
|
<<: *airflow-common
|
2023-06-25 20:53:51 +02:00
|
|
|
command: webserver
|
|
|
|
restart: "unless-stopped"
|
2023-06-21 16:02:12 +02:00
|
|
|
ports:
|
|
|
|
- 8080:8080
|
|
|
|
depends_on:
|
|
|
|
airflow-init:
|
|
|
|
condition: service_completed_successfully
|
2023-06-23 15:20:40 +02:00
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: postgres:15.3-alpine
|
2023-06-25 20:53:51 +02:00
|
|
|
restart: "unless-stopped"
|
2023-06-23 15:20:40 +02:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
volumes:
|
|
|
|
- ./state/postgres/data:/var/lib/postgresql/data
|
|
|
|
environment:
|
|
|
|
- "POSTGRES_PASSWORD=postgres"
|
|
|
|
- "POSTGRES_USER=postgres"
|
|
|
|
|
|
|
|
terraform:
|
|
|
|
image: hashicorp/terraform
|
|
|
|
entrypoint: /usr/local/bin/terraform-entrypoint.sh
|
|
|
|
restart: "no"
|
|
|
|
working_dir: /terraform
|
|
|
|
volumes:
|
|
|
|
- ./scripts/terraform-entrypoint.sh:/usr/local/bin/terraform-entrypoint.sh:ro
|
|
|
|
- ./terraform:/terraform
|
|
|
|
- ./state/tfstate:/terraform/tfstate
|
|
|
|
depends_on:
|
|
|
|
airflow-webserver:
|
|
|
|
condition: service_started
|
|
|
|
postgres:
|
|
|
|
condition: service_started
|
|
|
|
environment:
|
|
|
|
- "TF_VAR_pg_host=postgres"
|
|
|
|
- "TF_VAR_pg_port=5432"
|
|
|
|
- "TF_VAR_pg_password=postgres"
|
|
|
|
- "TF_VAR_pg_username=postgres"
|
2023-06-24 19:07:02 +02:00
|
|
|
|
|
|
|
notebook:
|
|
|
|
image: jupyter/scipy-notebook
|
2023-06-25 20:53:51 +02:00
|
|
|
restart: "unless-stopped"
|
2023-06-24 19:07:02 +02:00
|
|
|
ports:
|
|
|
|
- 8888:8888
|
|
|
|
volumes:
|
|
|
|
- ./notebooks:/home/jovyan/work
|
|
|
|
- ./data:/home/jovyan/data:ro
|