#!/bin/sh set -eu cd /app mkdir -p \ database \ storage/app/private/recordings \ storage/app/public \ storage/framework/cache \ storage/framework/sessions \ storage/framework/views \ storage/logs \ bootstrap/cache if [ ! -f database/database.sqlite ]; then touch database/database.sqlite fi # Never use a host Vite HMR file inside the container image. rm -f public/hot # Bind mounts may arrive as root-owned; keep the app and host tooling writable. chmod -R a+rwX database storage bootstrap/cache 2>/dev/null || true if [ -z "${APP_KEY:-}" ]; then echo "APP_KEY is not set. Generate one with: php artisan key:generate --show" >&2 exit 1 fi php artisan migrate --force --no-interaction exec "$@"