Skip to content

Instantly share code, notes, and snippets.

@saurabhkdm
Created October 19, 2020 09:09
Embed
What would you like to do?
TIG stack for airlfow..
version: '2.1'
services:
redis:
image: 'redis:5.0.5'
command: redis-server --requirepass redispass
postgres:
image: postgres:9.6
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
# - PGDATA=/var/lib/postgresql/data/pgdata
# volumes:
# - ./mnt/postgres:/var/lib/postgresql/data/pgdata
webserver:
build:
context: ./docker/airflow
image: puckel/docker-airflow:1.10.9
restart: always
depends_on:
- postgres
- redis
environment:
- LOAD_EX=n
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
- REDIS_PASSWORD=redispass
- PYTHONPATH=/usr/local/airflow/conf/
volumes:
- ./mnt/airflow/dags:/usr/local/airflow/dags
- ./mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg
- ./mnt/airflow/logs:/usr/local/airflow/logs
- ./mnt/airflow/conf:/usr/local/airflow/conf
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
flower:
build:
context: ./docker/airflow
image: puckel/docker-airflow:1.10.9
restart: always
depends_on:
- redis
environment:
- EXECUTOR=Celery
- REDIS_PASSWORD=redispass
ports:
- "5555:5555"
command: flower
scheduler:
build:
context: ./docker/airflow
image: puckel/docker-airflow:1.10.9
restart: always
depends_on:
- webserver
volumes:
- ./mnt/airflow/dags:/usr/local/airflow/dags
- ./mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg
- ./mnt/airflow/logs:/usr/local/airflow/logs
- ./mnt/airflow/conf:/usr/local/airflow/conf
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
environment:
- LOAD_EX=n
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
- REDIS_PASSWORD=redispass
- PYTHONPATH=/usr/local/airflow/conf/
command: scheduler
worker:
build:
context: ./docker/airflow
image: puckel/docker-airflow:1.10.9
restart: always
depends_on:
- scheduler
volumes:
- ./mnt/airflow/dags:/usr/local/airflow/dags
- ./mnt/airflow/airflow.cfg:/usr/local/airflow/airflow.cfg
- ./mnt/airflow/logs:/usr/local/airflow/logs
- ./mnt/airflow/conf:/usr/local/airflow/conf
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
environment:
- FERNET_KEY=46BKJoQYlPPOexq0OhDZnIlNepKFf87WFwLbfzqDDho=
- EXECUTOR=Celery
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
- REDIS_PASSWORD=redispass
- PYTHONPATH=/usr/local/airflow/conf/
command: worker
telegraf:
container_name: telegraf
image: telegraf:1.12.3
volumes:
- ./mnt/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
influxdb:
container_name: influxdb
image: influxdb:1.7.8
ports:
- "8083:8083"
- "8086:8086"
# Uncomment this section to keep data
#volumes:
# - ./mnt/influxdb:/var/lib/influxdb
grafana:
container_name: grafana
image: grafana/grafana
volumes:
- ./mnt/grafana/grafana.ini:/etc/grafana/grafana.ini
ports:
- "3000:3000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment