From 9ea55e33bde9df6842f9a386b2b0878ff2164065 Mon Sep 17 00:00:00 2001 From: Boban Blaskovic Date: Sun, 31 May 2026 22:58:45 +0200 Subject: [PATCH] Dev: bind-mount ./app + vite dev mode + drop asset preload tags - docker-compose.yml: bind-mount ./app:/var/www/html on nginx + all PHP services. CLI dev workflow now uses host code directly (no rebuild needed for code or CSS changes). Portainer-stack untouched (uses docker-compose.portainer.yml without bind-mounts). - AppServiceProvider: Vite::usePreloadTagAttributes(false) drops the tags that triggered 'preloaded but not used within a few seconds' warnings under wire:navigate. - vendor/ + composer.lock synced from container to host so bind-mount exposes a complete tree. --- app/app/Providers/AppServiceProvider.php | 12 +++++------- docker-compose.yml | 6 ++++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/app/Providers/AppServiceProvider.php b/app/app/Providers/AppServiceProvider.php index 452e6b6..3525866 100644 --- a/app/app/Providers/AppServiceProvider.php +++ b/app/app/Providers/AppServiceProvider.php @@ -2,23 +2,21 @@ namespace App\Providers; +use Illuminate\Support\Facades\Vite; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { - /** - * Register any application services. - */ public function register(): void { // } - /** - * Bootstrap any application services. - */ public function boot(): void { - // + // Drop the modulepreload tags — they trigger + // "preloaded but not used within a few seconds" warnings under + // wire:navigate. Stylesheets still load fine via the regular link. + Vite::usePreloadTagAttributes(false); } } diff --git a/docker-compose.yml b/docker-compose.yml index 7e5316f..f9ce827 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -50,6 +50,8 @@ services: - "${HTTP_PORT:-80}:80" extra_hosts: - "host.docker.internal:host-gateway" + volumes: + - ./app:/var/www/html depends_on: app: condition: service_started @@ -69,6 +71,7 @@ services: restart: unless-stopped environment: *php-env volumes: + - ./app:/var/www/html - app-storage:/var/www/html/storage depends_on: mysql: @@ -85,6 +88,7 @@ services: command: php artisan queue:work --tries=3 --timeout=120 environment: *php-env volumes: + - ./app:/var/www/html - app-storage:/var/www/html/storage depends_on: mysql: @@ -103,6 +107,7 @@ services: command: php artisan schedule:work environment: *php-env volumes: + - ./app:/var/www/html - app-storage:/var/www/html/storage depends_on: mysql: @@ -119,6 +124,7 @@ services: command: php artisan reverb:start --host=0.0.0.0 --port=8080 environment: *php-env volumes: + - ./app:/var/www/html - app-storage:/var/www/html/storage depends_on: redis: