You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `npm`/`ncu` EACCES on host (`package.json`) | `make fix-permissions` chowns to host UID, not container `sail` |
244
+
| `fatal: detected dubious ownership` (git) | `make fix-permissions` registers `safe.directory` in the container |
245
+
| Container `sail` UID ≠ host UID | Set `WWWUSER=$(id -u)` / `WWWGROUP=$(id -g)` in `.env`, then `make rebuild` |
246
+
| Host artisan/npm fails with `/var/www/html/...` paths | Stale `bootstrap/cache/config.php` from a container `config:cache`. Run `make cache-clear` and prefer `make optimize` (dev-safe) over `optimize-deploy` in development |
239
247
| Port already in use | Change `APP_PORT`, `FORWARD_DB_PORT`, etc. in `.env` |
240
248
| Containers won't start | `make logs` to inspect, or `make rebuild` to start fresh |
241
249
| Stale images after upgrade | `make update` (pulls base images + rebuild + restart) |
@if [ "$(WWWUSER)"!="$(HOST_UID)" ] || [ -z"$(WWWUSER)" ];thenecho"$(YELLOW)⚠ WWWUSER ($(WWWUSER)) ≠ host UID ($(HOST_UID)). Set WWWUSER=$(HOST_UID) and WWWGROUP=$(HOST_GID) in .env, then run 'make rebuild' to align the container's sail user.$(RESET)";fi
228
+
.PHONY: fix-perms
229
+
fix-perms: fix-permissions ## Alias for 'fix-permissions'
230
+
231
+
.PHONY: git-safe-directory
232
+
git-safe-directory: ## Register /var/www/html as a git safe.directory inside the container
0 commit comments