mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:15 +02:00
111 lines
2.1 KiB
YAML
111 lines
2.1 KiB
YAML
version: "3.7"
|
|
|
|
services:
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
command: --save 900 1
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- /data/redis:/data
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
postgres:
|
|
image: postgres:alpine
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- /data/postgres:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_USER=airflow
|
|
- POSTGRES_PASSWORD=airflow
|
|
- POSTGRES_DB=airflow
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
webserver:
|
|
image: vimagick/airflow
|
|
command: webserver
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- airflow_data:/opt/airflow
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
restart_policy:
|
|
condition: on-failure
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
|
|
scheduler:
|
|
image: vimagick/airflow
|
|
command: scheduler
|
|
volumes:
|
|
- airflow_data:/opt/airflow
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
restart_policy:
|
|
condition: on-failure
|
|
depends_on:
|
|
- webserver
|
|
|
|
flower:
|
|
image: vimagick/airflow
|
|
command: flower
|
|
ports:
|
|
- "5555:5555"
|
|
volumes:
|
|
- airflow_data:/opt/airflow
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
restart_policy:
|
|
condition: on-failure
|
|
depends_on:
|
|
- webserver
|
|
|
|
worker:
|
|
image: vimagick/airflow
|
|
command: worker
|
|
volumes:
|
|
- airflow_data:/opt/airflow
|
|
deploy:
|
|
replicas: 0
|
|
placement:
|
|
constraints:
|
|
- node.role == worker
|
|
restart_policy:
|
|
condition: on-failure
|
|
depends_on:
|
|
- webserver
|
|
|
|
volumes:
|
|
|
|
airflow_data:
|
|
driver: local
|
|
driver_opts:
|
|
type: nfs
|
|
o: "addr=10.0.0.1,nolock,soft,rw"
|
|
device: ":/export/airflow"
|