Skip to content

Commit

Permalink
Look in /var/www/.volker/php for custom root and www script too.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomb1n0 committed Jun 11, 2024
1 parent 0476657 commit 4e946be
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion resources/scripts/php/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ if [ -f '/docker-scripts/custom-root-script.sh' ]; then
echo 'Found custom-root-script.sh to run'
sudo -E /docker-scripts/custom-root-script.sh
fi

if [ -f '/docker-scripts/www-start-script.sh' ]; then
echo 'Found www-start-script.sh to run'
/docker-scripts/www-start-script.sh
Expand All @@ -38,5 +37,22 @@ if [ -f '/docker-scripts/custom-www-script.sh' ]; then
/docker-scripts/custom-www-script.sh
fi

# Look for these custom scripts /var/www/.volker/php too.
#
# This means the end user doesn't have to bind mount
# the script in with an override, it's a convention.
#
# We deliberately look in /php to open up the possibility of custom
# scripts for nginx etc later.
if [ -f '/var/www/.volker/php/custom-root-script.sh' ]; then
echo 'Found custom-root-script.sh to run'
sudo -E /var/www/.volker/php/custom-root-script.sh
fi

if [ -f '/var/www/.volker/php/custom-www-script.sh' ]; then
echo 'Found custom-www-script.sh to run'
/var/www/.volker/php/custom-www-script.sh
fi

echo "Running command exec $*"
exec "$@"

0 comments on commit 4e946be

Please sign in to comment.