Add search directory population to entrypoint.sh

This commit is contained in:
Dale Davies
2022-06-06 18:05:14 +01:00
parent 064137a9ed
commit 6b023807b3

View File

@@ -10,7 +10,7 @@ if [ -z "${DEVELOPMENT-}" ]; then
fi
cp /usr/src/jumpapp/* /var/www/html -r
echo >&2 "- Check if backgrounds or sites volumes have been mounted."
echo >&2 "- Check if backgrounds, search or sites volumes have been mounted."
if [ -e "/backgrounds" ]; then
echo >&2 " - Backgrounds directory is mapped... symlinking."
rm /var/www/html/assets/backgrounds -r
@@ -31,6 +31,16 @@ if [ -z "${DEVELOPMENT-}" ]; then
fi
fi
if [ -e "/search" ]; then
echo >&2 " - Search directory is mapped... symlinking."
rm /var/www/html/search -r
ln -s /search /var/www/html/
if [ ! "$(ls -A /search)" ]; then
echo >&2 " -- Empty so populating with default files."
cp /usr/src/jumpapp/search/* /search -r
fi
fi
echo >&2 "- All done! Starting nginx/php services now."
echo >&2 "-------------------------------------------------------------"
fi