You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2023/01/11 21:25:51 UTC
[airflow] 10/27: Add AIRFLOW_PROJ_DIR to docker-compose example (#28517)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-5-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 06901ddaed0b40c07858988543854bf720ce4ade
Author: Kfir Gollan <kf...@gmail.com>
AuthorDate: Thu Dec 22 09:05:55 2022 +0200
Add AIRFLOW_PROJ_DIR to docker-compose example (#28517)
Add an environment variable called AIRFLOW_PROJ_DIR that allows
controlling the base directory for volumes.
This allows custom folder structure when working with the example
docker-compose.
(cherry picked from commit 3f88148080157d1d8f9e0495e7c79ad81d475fca)
---
docs/apache-airflow/howto/docker-compose/docker-compose.yaml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/docs/apache-airflow/howto/docker-compose/docker-compose.yaml b/docs/apache-airflow/howto/docker-compose/docker-compose.yaml
index 99e675a42c..38e8e8b471 100644
--- a/docs/apache-airflow/howto/docker-compose/docker-compose.yaml
+++ b/docs/apache-airflow/howto/docker-compose/docker-compose.yaml
@@ -27,6 +27,8 @@
# Default: apache/airflow:|version|
# AIRFLOW_UID - User ID in Airflow containers
# Default: 50000
+# AIRFLOW_PROJ_DIR - Base path to which all the files will be volumed.
+# Default: .
# Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode
#
# _AIRFLOW_WWW_USER_USERNAME - Username for the administrator account (if requested).
@@ -60,9 +62,9 @@ x-airflow-common:
AIRFLOW__API__AUTH_BACKENDS: 'airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session'
_PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-}
volumes:
- - ./dags:/opt/airflow/dags
- - ./logs:/opt/airflow/logs
- - ./plugins:/opt/airflow/plugins
+ - ${AIRFLOW_PROJ_DIR:-.}/dags:/opt/airflow/dags
+ - ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs
+ - ${AIRFLOW_PROJ_DIR:-.}/plugins:/opt/airflow/plugins
user: "${AIRFLOW_UID:-50000}:0"
depends_on:
&airflow-common-depends-on
@@ -238,7 +240,7 @@ services:
_PIP_ADDITIONAL_REQUIREMENTS: ''
user: "0:0"
volumes:
- - .:/sources
+ - ${AIRFLOW_PROJ_DIR:-.}:/sources
airflow-cli:
<<: *airflow-common