From 6b023807b3969434da9d2ec9cc7ce4ac1ddb26b1 Mon Sep 17 00:00:00 2001 From: Dale Davies Date: Mon, 6 Jun 2022 18:05:14 +0100 Subject: [PATCH] Add search directory population to entrypoint.sh --- docker/entrypoint.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index ab36d3e..466b91c 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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