From 55a3917d1d731c9ae4901e5133df6ef1ac1e3675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Mon, 16 May 2022 14:04:41 +0200 Subject: [PATCH] Use profiles to disable flower in docker-compose (#23709) (cherry picked from commit de3c0389eb42fa59eb9a4ad9caa2cd85baa367a0) --- docs/apache-airflow/start/docker-compose.yaml | 37 +++++++++++-------- docs/apache-airflow/start/docker.rst | 2 +- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/docs/apache-airflow/start/docker-compose.yaml b/docs/apache-airflow/start/docker-compose.yaml index 9b5f2e1167b79..c03e305da1df4 100644 --- a/docs/apache-airflow/start/docker-compose.yaml +++ b/docs/apache-airflow/start/docker-compose.yaml @@ -252,22 +252,27 @@ services: - bash - -c - airflow -# you can enable flower by uncommenting those lines -# flower: -# <<: *airflow-common -# command: celery flower -# ports: -# - 5555:5555 -# healthcheck: -# test: ["CMD", "curl", "--fail", "http://localhost:5555/"] -# interval: 10s -# timeout: 10s -# retries: 5 -# restart: always -# depends_on: -# <<: *airflow-common-depends-on -# airflow-init: -# condition: service_completed_successfully + + # You can enable flower by adding "--profile flower" option e.g. docker-compose --profile flower up + # or by explicitly targeted on the command line e.g. docker-compose up flower. + # See: https://docs.docker.com/compose/profiles/ + flower: + <<: *airflow-common + command: celery flower + profiles: + - flower + ports: + - 5555:5555 + healthcheck: + test: ["CMD", "curl", "--fail", "http://localhost:5555/"] + interval: 10s + timeout: 10s + retries: 5 + restart: always + depends_on: + <<: *airflow-common-depends-on + airflow-init: + condition: service_completed_successfully volumes: postgres-db-volume: diff --git a/docs/apache-airflow/start/docker.rst b/docs/apache-airflow/start/docker.rst index a0e72f5ae5632..1a08f33f337c4 100644 --- a/docs/apache-airflow/start/docker.rst +++ b/docs/apache-airflow/start/docker.rst @@ -101,7 +101,7 @@ This file contains several service definitions: - ``postgres`` - The database. - ``redis`` - `The redis `__ - broker that forwards messages from scheduler to worker. -Optionally you can enable flower by uncommenting the commented lines if you want to be able to monitor celery workers separately. +Optionally you can enable flower by adding ``--profile flower`` option e.g. ``docker-compose --profile flower up`` or by explicitly targeted on the command line e.g. ``docker-compose up flower``. - ``flower`` - `The flower app `__ for monitoring the environment. It is available at ``http://localhost:5555``.