fix: build Vite assets in entrypoint for production (APP_ENV=production)

Eliminates dependency on node dev server for live site. Assets served
as static files from public/build/ instead of proxied through Vite.
This commit is contained in:
Thorsten Bus 2026-03-30 22:55:47 +02:00
parent 04ef0b08c8
commit 862b9f6c16

View file

@ -12,9 +12,15 @@ if [ -n "$WWWGROUP" ] && [ "$WWWGROUP" != "0" ]; then
fi
composer install --no-interaction
npm install
mkdir -p storage/logs storage/framework/views storage/framework/cache storage/framework/sessions
chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache
if [ "$APP_ENV" = "production" ] || [ "$APP_ENV" = "prod" ]; then
npm run build
fi
php artisan migrate --force
exec "$@"