Harden compose dev caches with dedicated Nuxt volumes

This commit is contained in:
Ruslan Bakiev
2026-02-19 04:50:40 +07:00
parent 1999cff6de
commit a09acc62a0
2 changed files with 8 additions and 1 deletions

View File

@@ -5,7 +5,10 @@ cd "$(dirname "$0")/.."
# Prevent path leakage between host Nuxt build cache and Docker runtime.
# If any cache contains absolute /Users/... imports, Nitro dev runtime can break in /app.
rm -rf .nuxt .output node_modules/.cache node_modules/.vite
mkdir -p .nuxt .output
find .nuxt -mindepth 1 -maxdepth 1 -exec rm -rf {} + || true
find .output -mindepth 1 -maxdepth 1 -exec rm -rf {} + || true
rm -rf node_modules/.cache node_modules/.vite
# Install deps (container starts from a clean image).
# Fallback to npm install when lockfile was produced by a newer npm major.