diff --git a/README.md b/README.md index 922e51a7..aaad5366 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ In order to incorporate plugins into your docker container - Create a file "requirements.txt" with the desired python modules - Mount this file as a volume `-v $(pwd)/requirements.txt:/requirements.txt` (or add it as a volume in docker-compose file) +- To mount the file in another location modify the `PIP_REQUIREMENTS_PATH` variable - The entrypoint.sh script execute the pip install command (with --user option) ## UI Links diff --git a/script/entrypoint.sh b/script/entrypoint.sh index 166f4837..df51ba10 100755 --- a/script/entrypoint.sh +++ b/script/entrypoint.sh @@ -23,9 +23,10 @@ export \ AIRFLOW__CORE__FERNET_KEY \ AIRFLOW__CORE__LOAD_EXAMPLES \ -# Install custom python package if requirements.txt is present -if [ -e "/requirements.txt" ]; then - $(command -v pip) install --user -r /requirements.txt +# Install custom python package if requirements.txt is present for the specified location +: "${PIP_REQUIREMENTS_PATH:="/requirements.txt"}" +if [ -e "$PIP_REQUIREMENTS_PATH" ]; then + $(command -v pip) install --user -r "$PIP_REQUIREMENTS_PATH" fi wait_for_port() {