From 132a9ae231126467470e1d7e2cbabe408513f028 Mon Sep 17 00:00:00 2001 From: Ahmed Darrazi Date: Thu, 8 Jan 2026 02:10:18 +0100 Subject: [PATCH 1/2] fix(sail): isolate node_modules in container Prevent cross-OS node_modules from breaking Sail npm/vite builds (Rollup optional dependency mismatch). --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 1f9565b..8df30c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,7 @@ services: APP_SERVICE: laravel.test volumes: - '.:/var/www/html' + - '/var/www/html/node_modules' networks: - sail depends_on: @@ -40,6 +41,7 @@ services: APP_SERVICE: queue volumes: - '.:/var/www/html' + - '/var/www/html/node_modules' networks: - sail depends_on: -- 2.45.2 From d790f7a3fbc3cdf0f7ac7ef206b7540ffc69764b Mon Sep 17 00:00:00 2001 From: Ahmed Darrazi Date: Thu, 8 Jan 2026 02:17:36 +0100 Subject: [PATCH 2/2] fix(sail): auto-fix node_modules volume permissions --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8df30c2..18e7141 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,8 +14,10 @@ services: - '${VITE_PORT:-5173}:${VITE_PORT:-5173}' environment: WWWUSER: '${WWWUSER:-1000}' + WWWGROUP: '${WWWGROUP:-1000}' LARAVEL_SAIL: 1 APP_SERVICE: laravel.test + entrypoint: ["/bin/sh", "-c", "mkdir -p /var/www/html/node_modules && chown ${WWWUSER:-1000}:${WWWGROUP:-1000} /var/www/html/node_modules || true; exec start-container"] volumes: - '.:/var/www/html' - '/var/www/html/node_modules' @@ -37,8 +39,10 @@ services: - 'host.docker.internal:host-gateway' environment: WWWUSER: '${WWWUSER:-1000}' + WWWGROUP: '${WWWGROUP:-1000}' LARAVEL_SAIL: 1 APP_SERVICE: queue + entrypoint: ["/bin/sh", "-c", "mkdir -p /var/www/html/node_modules && chown ${WWWUSER:-1000}:${WWWGROUP:-1000} /var/www/html/node_modules || true; exec start-container"] volumes: - '.:/var/www/html' - '/var/www/html/node_modules' -- 2.45.2