Files
airflow_in_docker_compose/docker-compose-celery-executor.yml
Iuliia Volkova 3d15d113b5 update version to 1.10.6, added screens, added tests dag (#1)
* update version to 1.10.6, added screens, added tests dag

* fix docker and readme

* edit readme.md
2019-11-29 23:51:53 +03:00

105 lines
2.5 KiB
YAML

version: "3"
services:
postgres:
image: "postgres:9.6"
container_name: "postgres"
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
ports:
- "5432:5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
# uncomment initdb if you need initdb at first run
# initdb:
# build: .
# entrypoint: airflow initdb
# depends_on:
# - postgres
webserver:
build: .
restart: always
depends_on:
- postgres
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
ports:
- "8080:8080"
entrypoint: airflow webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
scheduler:
build: .
restart: always
depends_on:
- postgres
- webserver
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
entrypoint: airflow scheduler
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-scheduler.pid ]"]
interval: 30s
timeout: 30s
retries: 3
redis:
image: redis:5.0.5
worker_1:
build: .
restart: always
depends_on:
- postgres
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
entrypoint: airflow worker -cn worker_1
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-worker.pid ]"]
interval: 30s
timeout: 30s
retries: 3
worker_2:
build: .
restart: always
depends_on:
- postgres
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
entrypoint: airflow worker -cn worker_2
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-worker.pid ]"]
interval: 30s
timeout: 30s
retries: 3
worker_3:
build: .
restart: always
depends_on:
- postgres
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
entrypoint: airflow worker -cn worker_3
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-worker.pid ]"]
interval: 30s
timeout: 30s
retries: 3
flower:
build: .
restart: always
depends_on:
- postgres
volumes:
- ./airflow_files/dags:/usr/local/airflow/dags
entrypoint: airflow flower
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-flower.pid ]"]
interval: 30s
timeout: 30s
retries: 3
ports:
- "5555:5555"