From a09acc62a03648070a81b5a56720fb7c0b93f556 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev Date: Thu, 19 Feb 2026 04:50:40 +0700 Subject: [PATCH] Harden compose dev caches with dedicated Nuxt volumes --- Frontend/scripts/compose-dev.sh | 5 ++++- compose.yaml | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Frontend/scripts/compose-dev.sh b/Frontend/scripts/compose-dev.sh index 96751dc..73d2d77 100755 --- a/Frontend/scripts/compose-dev.sh +++ b/Frontend/scripts/compose-dev.sh @@ -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. diff --git a/compose.yaml b/compose.yaml index 767bb77..f09b92e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -8,6 +8,8 @@ services: - ./Frontend:/app/Frontend - clientsflow_data:/app/.data - frontend_node_modules:/app/Frontend/node_modules + - frontend_nuxt:/app/Frontend/.nuxt + - frontend_output:/app/Frontend/.output ports: - "3000:3000" environment: @@ -35,4 +37,6 @@ services: volumes: clientsflow_data: frontend_node_modules: + frontend_nuxt: + frontend_output: redis_data: