From e78a6230b5f39c78c7b41eb33e99de0ac8d6a911 Mon Sep 17 00:00:00 2001 From: "ext.jeremy.guillot@maxicoffee.domains" Date: Wed, 11 Mar 2026 19:22:56 +0100 Subject: [PATCH] fix: deploy --- deploy.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy.php b/deploy.php index 64c20ae..26f7f01 100644 --- a/deploy.php +++ b/deploy.php @@ -36,11 +36,12 @@ task('deploy:vendors', function () { }); // Build assets via container node éphémère -// --user assure que public/build/ appartient au user deploy et non root -// mangarr_node_modules volume = cache npm entre les déploiements +// Le cache webpack (node_modules/.cache) est persisté dans shared/webpack_cache entre les releases +// → 1er build lent, suivants compilent uniquement les modules modifiés desc('Build Webpack Encore assets'); task('webpack_encore:build', function () { - run('docker run --rm --user $(id -u):$(id -g) -e npm_config_cache=/tmp/npm-cache -e PUPPETEER_SKIP_DOWNLOAD=1 -v {{release_path}}:/app -w /app node:22-alpine sh -c "npm install && npm run build"'); + run('mkdir -p /srv/mangarr/shared/webpack_cache'); + run('docker run --rm --user $(id -u):$(id -g) -e npm_config_cache=/tmp/npm-cache -e PUPPETEER_SKIP_DOWNLOAD=1 -v {{release_path}}:/app -v /srv/mangarr/shared/webpack_cache:/app/node_modules/.cache -w /app node:22-alpine sh -c "npm install && npm run build"'); }); // Restart Docker containers (entrypoint gère les migrations automatiquement)