You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/05/16 12:45:09 UTC
[airflow] 02/02: Use profiles to disable flower in docker-compose (#23709)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 55a3917d1d731c9ae4901e5133df6ef1ac1e3675
Author: Kamil BreguĊa <mi...@users.noreply.github.com>
AuthorDate: Mon May 16 14:04:41 2022 +0200
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 9b5f2e1167..c03e305da1 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 a0e72f5ae5..1a08f33f33 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 <https://redis.io/>`__ - 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 <https://flower.readthedocs.io/en/latest/>`__ for monitoring the environment.
It is available at ``http://localhost:5555``.