Harden compose dev caches with dedicated Nuxt volumes
This commit is contained in:
@@ -5,7 +5,10 @@ cd "$(dirname "$0")/.."
|
|||||||
|
|
||||||
# Prevent path leakage between host Nuxt build cache and Docker runtime.
|
# 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.
|
# 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).
|
# Install deps (container starts from a clean image).
|
||||||
# Fallback to npm install when lockfile was produced by a newer npm major.
|
# Fallback to npm install when lockfile was produced by a newer npm major.
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ services:
|
|||||||
- ./Frontend:/app/Frontend
|
- ./Frontend:/app/Frontend
|
||||||
- clientsflow_data:/app/.data
|
- clientsflow_data:/app/.data
|
||||||
- frontend_node_modules:/app/Frontend/node_modules
|
- frontend_node_modules:/app/Frontend/node_modules
|
||||||
|
- frontend_nuxt:/app/Frontend/.nuxt
|
||||||
|
- frontend_output:/app/Frontend/.output
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
environment:
|
||||||
@@ -35,4 +37,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
clientsflow_data:
|
clientsflow_data:
|
||||||
frontend_node_modules:
|
frontend_node_modules:
|
||||||
|
frontend_nuxt:
|
||||||
|
frontend_output:
|
||||||
redis_data:
|
redis_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user