This commit is contained in:
parent
9d61e4231a
commit
e78a6230b5
@@ -36,11 +36,12 @@ task('deploy:vendors', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Build assets via container node éphémère
|
// Build assets via container node éphémère
|
||||||
// --user assure que public/build/ appartient au user deploy et non root
|
// Le cache webpack (node_modules/.cache) est persisté dans shared/webpack_cache entre les releases
|
||||||
// mangarr_node_modules volume = cache npm entre les déploiements
|
// → 1er build lent, suivants compilent uniquement les modules modifiés
|
||||||
desc('Build Webpack Encore assets');
|
desc('Build Webpack Encore assets');
|
||||||
task('webpack_encore:build', function () {
|
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)
|
// Restart Docker containers (entrypoint gère les migrations automatiquement)
|
||||||
|
|||||||
Reference in New Issue
Block a user