Skip to content

Commit

Permalink
Add search directory population to entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
daledavies committed Jun 6, 2022
1 parent 064137a commit 6b02380
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6b02380

Please sign in to comment.