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
  <link rel=preload> 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.
master
Boban Blaskovic 2026-05-31 22:58:45 +02:00
parent b15e6f2146
commit 9ea55e33bd
2 changed files with 11 additions and 7 deletions

View File

@ -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 <link> 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);
}
}

View File

@ -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: