docker-alpine-php83-aio/config/entrypoint.sh
Christopher Vagnetoft ec4dc0727a
Some checks failed
dockerbuild / Build docker image (push) Failing after 1m33s
Improved framework logic
2024-02-06 01:31:34 +01:00

32 lines
765 B
Bash
Executable File

#!/bin/sh
if [ ! -f /usr/bin/php ]; then
ln -s /usr/bin/php83 /usr/bin/php
fi
# run scripts in /entrypoint.d/
if [ -d /entrypoint.d ]; then
echo "[-] Calling entrypoint scripts..."
for filename in /entrypoint.d/*.sh; do
echo " -> $filename"
if ! sh "$filename"; then exit 1; fi
done
else
echo "[!] No scripts matching *.sh found in /entrypoint.d"
fi
# run framework setups
if [ -d /scripts/frameworks ]; then
cd /application
echo "[-] Calling framework setup scripts..."
for filename in /scripts/frameworks/*.sh; do
sh "$filename" && break
done
else
echo "[!] No scripts matching *.sh found in /scripts/frameworks"
fi
# pass off to supervisor
echo "[-] Spawning supervisor"
exec /usr/bin/supervisord -n -c /etc/supervisord.conf