This commit is contained in:
parent
566b62450e
commit
08e005a0d3
@@ -20,6 +20,11 @@ host('production')
|
||||
->set('deploy_path', '/srv/mangarr')
|
||||
->set('branch', 'main');
|
||||
|
||||
// Créer les dossiers que Docker doit monter comme volumes (gitignorés, absents de la release)
|
||||
task('deploy:prepare_dirs', function () {
|
||||
run('mkdir -p {{release_path}}/var {{release_path}}/public/images {{release_path}}/public/cbz {{release_path}}/public/tmp');
|
||||
});
|
||||
|
||||
// composer install via container éphémère (pas de PHP sur l'hôte requis)
|
||||
task('deploy:vendors', function () {
|
||||
run('docker run --rm -v {{release_path}}:/app -w /app composer:2 install {{composer_options}}');
|
||||
@@ -45,6 +50,7 @@ task('deploy:cache:clear', function () {});
|
||||
task('deploy:cache:warmup', function () {});
|
||||
|
||||
// Hooks
|
||||
after('deploy:update_code', 'deploy:prepare_dirs');
|
||||
after('deploy:vendors', 'webpack_encore:build');
|
||||
after('deploy:symlink', 'docker:restart');
|
||||
after('deploy:failed', 'deploy:unlock');
|
||||
|
||||
Reference in New Issue
Block a user