Compare commits

...

2 Commits

Author SHA1 Message Date
Ahmed Darrazi
d790f7a3fb fix(sail): auto-fix node_modules volume permissions 2026-01-08 02:17:36 +01:00
Ahmed Darrazi
132a9ae231 fix(sail): isolate node_modules in container
Prevent cross-OS node_modules from breaking Sail npm/vite builds (Rollup optional dependency mismatch).
2026-01-08 02:10:18 +01:00

View File

@ -14,10 +14,13 @@ services:
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}' - '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
environment: environment:
WWWUSER: '${WWWUSER:-1000}' WWWUSER: '${WWWUSER:-1000}'
WWWGROUP: '${WWWGROUP:-1000}'
LARAVEL_SAIL: 1 LARAVEL_SAIL: 1
APP_SERVICE: laravel.test 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: volumes:
- '.:/var/www/html' - '.:/var/www/html'
- '/var/www/html/node_modules'
networks: networks:
- sail - sail
depends_on: depends_on:
@ -36,10 +39,13 @@ services:
- 'host.docker.internal:host-gateway' - 'host.docker.internal:host-gateway'
environment: environment:
WWWUSER: '${WWWUSER:-1000}' WWWUSER: '${WWWUSER:-1000}'
WWWGROUP: '${WWWGROUP:-1000}'
LARAVEL_SAIL: 1 LARAVEL_SAIL: 1
APP_SERVICE: queue 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: volumes:
- '.:/var/www/html' - '.:/var/www/html'
- '/var/www/html/node_modules'
networks: networks:
- sail - sail
depends_on: depends_on: