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/01/23 13:21:59 UTC

[airflow] 05/24: Add docker-compose explanation to conn localhost (#19076)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 0b45b27580dcef38fa25c9f1ab44a6a71bb2583a
Author: Fernando Bugni <fe...@gmail.com>
AuthorDate: Tue Oct 19 17:24:32 2021 -0300

    Add docker-compose explanation to conn localhost (#19076)
    
    (cherry picked from commit fe2890246a7c3d014daa909cb19ac523edb15005)
---
 docs/apache-airflow/start/docker.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/docs/apache-airflow/start/docker.rst b/docs/apache-airflow/start/docker.rst
index 22763d9..023f669 100644
--- a/docs/apache-airflow/start/docker.rst
+++ b/docs/apache-airflow/start/docker.rst
@@ -82,6 +82,8 @@ This file contains several service definitions:
 - ``postgres`` - The database.
 - ``redis`` - `The redis <https://redis.io/>`__ - broker that forwards messages from scheduler to worker.
 
+In general, if you want to use airflow locally, your DAGs may try to connect to servers which are running on the host. In order to achieve that, an extra configuration must be added in ``docker-compose.yaml``. For example, on Linux the configuration must be in the section ``services: airflow-worker`` adding ``extra_hosts: - "host.docker.internal:host-gateway"``; and use ``host.docker.internal`` instead of ``localhost``. This configuration vary in different platforms. Please, see document [...]
+
 All these services allow you to run Airflow with :doc:`CeleryExecutor </executor/celery>`. For more information, see :doc:`/concepts/overview`.
 
 Some directories in the container are mounted, which means that their contents are synchronized between your computer and the container.