Taragolis commented on code in PR #37940:
URL: https://github.com/apache/airflow/pull/37940#discussion_r1514805195


##########
docs/apache-airflow/howto/docker-compose/index.rst:
##########
@@ -358,6 +358,52 @@ Networking
 
 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 check the Docker documentation for `Windows 
<https://docs.docker.com/desktop/windows/networking/#use-cases-and-workarounds>`_
 and `Mac 
<https://docs.docker.com/desktop/mac/networking/#use-cases-and-workarounds>`_ 
for further information.
 
+Debug Airflow inside docker container using Pycharm
+===================================================
+Prerequisites: Create a project in **PyCharm** and download the 
`docker-compose.yaml <{{ doc_root_url }}docker-compose.yaml>`__.
+
+Steps:
+
+1) Modify  ``docker-compose.yaml``
+
+   Add the following section under the ``services`` section:
+
+.. code-block:: docker
+
+    services:

Review Comment:
   I'm sure that I know that this line shouldn't be copied.
   But worried that end users copy it under services with preserving this line, 
e.g.
   
   ```yaml
   services:
     ..
     services:
         airflow-python:
           <<: *airflow-common
           profiles:
             - debug
           environment:
             <<: *airflow-common-env
           user: "50000:0"
           entrypoint: ["bash"]
   ```



##########
docs/apache-airflow/howto/docker-compose/index.rst:
##########
@@ -358,6 +358,52 @@ Networking
 
 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 check the Docker documentation for `Windows 
<https://docs.docker.com/desktop/windows/networking/#use-cases-and-workarounds>`_
 and `Mac 
<https://docs.docker.com/desktop/mac/networking/#use-cases-and-workarounds>`_ 
for further information.
 
+Debug Airflow inside docker container using Pycharm
+===================================================
+Prerequisites: Create a project in **PyCharm** and download the 
`docker-compose.yaml <{{ doc_root_url }}docker-compose.yaml>`__.
+
+Steps:
+
+1) Modify  ``docker-compose.yaml``
+
+   Add the following section under the ``services`` section:
+
+.. code-block:: docker

Review Comment:
   ```suggestion
   .. code-block:: yaml
   ```



##########
docs/apache-airflow/howto/docker-compose/index.rst:
##########
@@ -358,6 +358,52 @@ Networking
 
 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 check the Docker documentation for `Windows 
<https://docs.docker.com/desktop/windows/networking/#use-cases-and-workarounds>`_
 and `Mac 
<https://docs.docker.com/desktop/mac/networking/#use-cases-and-workarounds>`_ 
for further information.
 
+Debug Airflow inside docker container using Pycharm
+===================================================
+Prerequisites: Create a project in **PyCharm** and download the 
`docker-compose.yaml <{{ doc_root_url }}docker-compose.yaml>`__.

Review Comment:
   I'm not sure why but locally URI doesn't rendered correctly: 
`http://127.0.0.1:8000/docs/apache-airflow/stable/howto/docker-compose/%7B%7Bdoc_root_url%7D%7Ddocker-compose.yaml`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to