From 862b9f6c1632289e90d77d0bbd7e7001244210ab Mon Sep 17 00:00:00 2001 From: Thorsten Bus Date: Mon, 30 Mar 2026 22:55:47 +0200 Subject: [PATCH] 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. --- build/entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 4c1f401..8dfa5b9 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -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 "$@"