This commit is contained in:
parent
08e005a0d3
commit
944994b7d7
@@ -26,15 +26,17 @@ task('deploy:prepare_dirs', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// composer install via container éphémère (pas de PHP sur l'hôte requis)
|
// composer install via container éphémère (pas de PHP sur l'hôte requis)
|
||||||
|
// --user assure que vendor/ appartient au user deploy et non root
|
||||||
task('deploy:vendors', function () {
|
task('deploy:vendors', function () {
|
||||||
run('docker run --rm -v {{release_path}}:/app -w /app composer:2 install {{composer_options}}');
|
run('docker run --rm --user $(id -u):$(id -g) -v {{release_path}}:/app -w /app composer:2 install {{composer_options}}');
|
||||||
});
|
});
|
||||||
|
|
||||||
// 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
|
||||||
// mangarr_node_modules volume = cache npm entre les déploiements
|
// mangarr_node_modules volume = cache npm entre les déploiements
|
||||||
desc('Build Webpack Encore assets');
|
desc('Build Webpack Encore assets');
|
||||||
task('webpack_encore:build', function () {
|
task('webpack_encore:build', function () {
|
||||||
run('docker run --rm -v {{release_path}}:/app -v mangarr_node_modules:/app/node_modules -w /app node:22-alpine sh -c "npm install && npm run build"');
|
run('docker run --rm --user $(id -u):$(id -g) -v {{release_path}}:/app -v mangarr_node_modules:/app/node_modules -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