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: