This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 36cb20af21 Added functionality to automatically ingest custom
airflow.cfg file upon startup (#36289)
36cb20af21 is described below
commit 36cb20af218919bcd821688e91245ffbe3fcfc16
Author: dominikhei <[email protected]>
AuthorDate: Tue Dec 19 13:49:15 2023 +0100
Added functionality to automatically ingest custom airflow.cfg file upon
startup (#36289)
---------
Co-authored-by: Andrey Anshin <[email protected]>
---
.../apache-airflow/howto/docker-compose/docker-compose.yaml | 3 +++
docs/apache-airflow/howto/docker-compose/index.rst | 13 +++++++++++++
2 files changed, 16 insertions(+)
diff --git a/docs/apache-airflow/howto/docker-compose/docker-compose.yaml
b/docs/apache-airflow/howto/docker-compose/docker-compose.yaml
index 6af7d020fa..9effc2d504 100644
--- a/docs/apache-airflow/howto/docker-compose/docker-compose.yaml
+++ b/docs/apache-airflow/howto/docker-compose/docker-compose.yaml
@@ -69,6 +69,9 @@ x-airflow-common:
# WARNING: Use _PIP_ADDITIONAL_REQUIREMENTS option ONLY for a quick checks
# for other purpose (development, test and especially production usage)
build/extend Airflow image.
_PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-}
+ # The following line can be used to set a custom config file, stored in
the local config folder
+ # If you want to use it, outcomment it and replace airflow.cfg with the
name of your config file
+ # AIRFLOW_CONFIG: '/opt/airflow/config/airflow.cfg'
volumes:
- ${AIRFLOW_PROJ_DIR:-.}/dags:/opt/airflow/dags
- ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs
diff --git a/docs/apache-airflow/howto/docker-compose/index.rst
b/docs/apache-airflow/howto/docker-compose/index.rst
index 1533d0c813..383a0f4c55 100644
--- a/docs/apache-airflow/howto/docker-compose/index.rst
+++ b/docs/apache-airflow/howto/docker-compose/index.rst
@@ -340,6 +340,19 @@ that conflicts with the version of apache-airflow that you
are using.
Run ``docker compose build`` to build the image, or add ``--build`` flag to
``docker compose up`` or
``docker compose run`` commands to build the image automatically as needed.
+Special case - Adding a custom config file
+==========================================
+
+If you have a custom config file and wish to use it in your Airflow instance,
you need to perform the following steps:
+
+1) Remove comment from the ``AIRFLOW_CONFIG:
'/opt/airflow/config/airflow.cfg'`` line
+ in the ``docker-compose.yaml`` file.
+
+2) Place your custom ``airflow.cfg`` file in the local config folder.
+
+3) If your config file has a different name than ``airflow.cfg``, adjust the
filename in
+ ``AIRFLOW_CONFIG: '/opt/airflow/config/airflow.cfg'``
+
Networking
==========