26 lines
705 B
Bash
26 lines
705 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
cd /app
|
|
|
|
# Allow Docker Compose services such as the queue worker and scheduler to override
|
|
# the default FrankenPHP process with their own command.
|
|
if [ "$#" -gt 0 ]; then
|
|
exec "$@"
|
|
fi
|
|
|
|
echo "Preparing Laravel..."
|
|
php artisan storage:link --force --no-interaction
|
|
php artisan migrate --force --no-interaction
|
|
php artisan optimize --no-interaction
|
|
|
|
echo "Starting Laravel Octane with FrankenPHP..."
|
|
exec php artisan octane:frankenphp \
|
|
--host=0.0.0.0 \
|
|
--port="${OCTANE_PORT:-80}" \
|
|
--admin-host=127.0.0.1 \
|
|
--admin-port="${OCTANE_ADMIN_PORT:-2019}" \
|
|
--workers="${OCTANE_WORKERS:-auto}" \
|
|
--max-requests="${OCTANE_MAX_REQUESTS:-500}" \
|
|
--no-interaction
|