#!/usr/bin/env sh set -e cd /app if [ ! -f ".env" ] && [ -f ".env.example" ]; then cp .env.example .env fi if [ ! -d "vendor" ]; then composer install fi if ! grep -q "^APP_KEY=" .env 2>/dev/null || grep -q "^APP_KEY=$" .env 2>/dev/null; then php artisan key:generate --force fi ROLE="${CONTAINER_ROLE:-app}" if [ "$ROLE" = "queue" ]; then exec php artisan queue:work --verbose --tries="${QUEUE_TRIES:-3}" --timeout="${QUEUE_TIMEOUT:-90}" fi if [ "$ROLE" = "horizon" ]; then exec php artisan horizon fi exec php artisan octane:start --server=frankenphp --host=0.0.0.0 --port="${PORT:-8000}" #exec php -S 0.0.0.0:8000 -t public