Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion runtime/layers/function/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
# Fail on error
set -e

# if APP_RUNTIME does not exist
if [[ -z "${APP_RUNTIME}" ]]; then
BOOTSTRAP="/opt/bref/bootstrap.php"
else
# Split _HANDLER on ":" and take the first part
BOOTSTRAP=(${_HANDLER//:/ })
fi

while true
do
# We redirect stderr to stdout so that everything
# written on the output ends up in Cloudwatch automatically
/opt/bin/php "/opt/bref/bootstrap.php" 2>&1
/opt/bin/php "${BOOTSTRAP}" 2>&1
done