Implement persistent extensions with optional runtime build
- Extensions are now explicitly copied from source to named volume - Optional rebuild at runtime allows for extensions not present during build - Closes #3pull/10/head
parent
7caaaa4a7c
commit
19f9c1b1ac
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Note starting directory
|
||||||
|
cur_dir=$(pwd)
|
||||||
|
|
||||||
|
# Specify the directory containing the top-level folders
|
||||||
|
directory="/app/extensions"
|
||||||
|
|
||||||
|
# Iterate over the extensions passed in args
|
||||||
|
for extension in "$@"; do
|
||||||
|
echo $extension
|
||||||
|
folder="$directory/$extension"
|
||||||
|
if [ -d "$folder" ]; then
|
||||||
|
# Change directory to the current folder
|
||||||
|
cd "$folder"
|
||||||
|
|
||||||
|
# Check if requirements.txt file exists
|
||||||
|
if [ -f "requirements.txt" ]; then
|
||||||
|
echo "Live installing requirements for $folder..."
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
echo "Requirements installed in $folder"
|
||||||
|
else
|
||||||
|
echo "Skipping live install of $folder: requirements.txt not found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Change back to the original directory
|
||||||
|
cd "$directory"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Return to starting directory
|
||||||
|
cd $cur_dir
|
Loading…
Reference in New Issue