Skip to content

Commit

Permalink
Added functionality to automatically ingest custom airflow.cfg file u…
Browse files Browse the repository at this point in the history
…pon startup and the associated documentation
  • Loading branch information
dominikhei committed Dec 18, 2023
1 parent 35117aa commit 05bfc1a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/apache-airflow/howto/docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ x-airflow-common:
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
AIRFLOW__API__AUTH_BACKENDS: 'airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session'
TEST:
# yamllint disable rule:line-length
# Use simple http server on scheduler for health checks
# See https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/check-health.html#scheduler-health-check-server
Expand All @@ -74,6 +75,10 @@ x-airflow-common:
- ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs
- ${AIRFLOW_PROJ_DIR:-.}/config:/opt/airflow/config
- ${AIRFLOW_PROJ_DIR:-.}/plugins:/opt/airflow/plugins
#The following line can be used to use a custom airflow.cfg, stored in the AIRFLOW_PROJ_DIR
#Uncomment the following line to make use of this
#- ${AIRFLOW_PROJ_DIR:-.}/airflow.cfg:/opt/airflow/airflow.cfg

user: "${AIRFLOW_UID:-50000}:0"
depends_on:
&airflow-common-depends-on
Expand Down
10 changes: 10 additions & 0 deletions docs/apache-airflow/howto/docker-compose/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,16 @@ 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_PROJ_DIR:-.}/airflow.cfg:/opt/airflow/airflow.cfg`` line
in the ``docker-compose.yaml`` file.

2) Place your custom ``airflow.cfg`` file in the same folder as the ``docker-compose.yaml`` file.

Networking
==========

Expand Down

0 comments on commit 05bfc1a

Please sign in to comment.