Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
91 lines
2.3 KiB
YAML
91 lines
2.3 KiB
YAML
version: '3'
|
|
x-airflow-common:
|
|
&airflow-common
|
|
image: vulhub/airflow:1.10.10
|
|
environment:
|
|
&airflow-common-env
|
|
AIRFLOW__CORE__EXECUTOR: CeleryExecutor
|
|
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
|
|
AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow
|
|
AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
|
|
AIRFLOW__CORE__FERNET_KEY: ''
|
|
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
|
|
AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
|
|
#AIRFLOW__API__AUTH_BACKEND: 'airflow.api.auth.backend.basic_auth'
|
|
AIRFLOW__API__AUTH_BACKEND: 'airflow.api.auth.backend.default'
|
|
user: "${AIRFLOW_UID:-50000}:${AIRFLOW_GID:-50000}"
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:13-alpine
|
|
environment:
|
|
POSTGRES_USER: airflow
|
|
POSTGRES_PASSWORD: airflow
|
|
POSTGRES_DB: airflow
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "airflow"]
|
|
interval: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:5-alpine
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 30s
|
|
retries: 50
|
|
|
|
airflow-webserver:
|
|
<<: *airflow-common
|
|
command: webserver
|
|
ports:
|
|
- 8080:8080
|
|
healthcheck:
|
|
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 5
|
|
|
|
airflow-scheduler:
|
|
<<: *airflow-common
|
|
command: scheduler
|
|
healthcheck:
|
|
test: ["CMD-SHELL", 'airflow jobs check --job-type SchedulerJob --hostname "$${HOSTNAME}"']
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 5
|
|
|
|
airflow-worker:
|
|
<<: *airflow-common
|
|
command: worker
|
|
healthcheck:
|
|
test:
|
|
- "CMD-SHELL"
|
|
- 'celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"'
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 5
|
|
|
|
airflow-init:
|
|
<<: *airflow-common
|
|
command: initdb
|
|
environment:
|
|
<<: *airflow-common-env
|
|
_AIRFLOW_DB_UPGRADE: 'true'
|
|
|
|
flower:
|
|
<<: *airflow-common
|
|
command: flower
|
|
ports:
|
|
- 5555:5555
|
|
healthcheck:
|
|
test: ["CMD", "curl", "--fail", "http://localhost:5555/"]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 5
|