Skip to content

Commit

Permalink
Use profiles to disable flower in docker-compose (#23709)
Browse files Browse the repository at this point in the history
(cherry picked from commit de3c038)
  • Loading branch information
mik-laj authored and ephraimbuddy committed May 21, 2022
1 parent e90395a commit b0b8a95
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
37 changes: 21 additions & 16 deletions docs/apache-airflow/start/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
2 changes: 1 addition & 1 deletion docs/apache-airflow/start/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down

0 comments on commit b0b8a95

Please sign in to comment.